OCIParse & OCIExecute
| From: | Vadim Tkachenko | Date: | Fri, 21 Apr 2000 08:02:50 +0000 |
| Subject: | OCIParse & OCIExecute | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13859@lists.php.net to get a copy of this message | ||
4 ex., if I make
{
$stmt=OCIParse($c1,"SELECT VEND_CODE,VEND_NAME FROM manuf WHERE
VEND_CODE=:vendcod");
OCIBindByName($stmt,":vendcod",&$vendcod,32);
$vendcod="P-1";
OCIExecute($stmt);
}
then
{
OCIFetch($stmt);
}
returns false like there is no record found.
but if I make the following :
{
$stmt=OCIParse($c1,"SELECT VEND_CODE,VEND_NAME FROM manuf WHERE
VEND_CODE='P-1'");
OCIExecute($stmt);
}
then
{
OCIFetch($stmt);
}
returns true, i.e. the record has been found.
In fact this record is present in table.
Then why doesn't the first method above find it ?
And one more question. Is there a way to get number of
records the SELECT statement returns ?