Hi,
I'm new to PHP. I'm trying to use the ora_bind option on my cursor so that I can enforce the bind variables for better performance.
Here is a simple script I tried against oracle 8.1.7 database and failed
:
:
$query = "select * from db_customer_information_tbl where last_name=:last
name";
ora_parse($curs, $query);
ora_bind($curs,"in_lastname",":lastname",30,1);
// Input the value for the select statement
//
$in_lastname = 'tester';
ora_exec($curs);
$ncols = ora_numcols($curs);
printf("<TABLE VALIGN=TOP>");
while ( ora_fetch($curs)){
printf("<TR>");
for ($i = 0; $i <$ncols; $i++) {
$col = ora_getcolumn($curs, $i);
printf("<TD> %s </TD> ", trim($col));
}
printf ("</TR> ");
}
printf("</TABLE>");
ora_close($curs);
ora_logoff($conn);
Could some one point out what I'm doing worng.
Thanx
Sam