Bug #3117: ora_bind needs the variable it binds to be global

From: Date: Thu, 06 Jan 2000 15:55:04 +0000
Subject: Bug #3117: ora_bind needs the variable it binds to be global
Groups: php.dev 
Request: Send a blank email to php-dev+get-14306@lists.php.net to get a copy of this message
From: shaymandel@yahoo.com Operating system: Linux PHP version: 3.0.12 PHP Bug Type: Oracle related Bug description: ora_bind needs the variable it binds to be global function func($cur1) { // the variable we get here is a cursor - declared in the calling function // global $a; // if $a will not be declared global - it won't work $a = 1; ora_parse($cur1,"select * from t where a = :a"); echo("$a"); ora_bind($cur1,"a",":a",11,ORA_BIND_IN); ora_exec($cur1); // the parser says the error is in this line(336). The error is :Warning: Can't find variable for parameter in includes/search_functions.inc on line 336 However, if I unremark the above line - global $a; this will work fine.

« previous php.dev (#14306) next »