Re: [PHP4BETA] OCIParse & OCIExecute

From: Date: Fri, 21 Apr 2000 09:21:39 +0000
Subject: Re: [PHP4BETA] OCIParse & OCIExecute
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13865@lists.php.net to get a copy of this message
On Fri, Apr 21, 2000 at 11:02:50AM +0300, Vadim Tkachenko wrote: > 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 ? please send a complete 20 line testcase of your problem to me. > > And one more question. Is there a way to get number of > records the SELECT statement returns ? no. not without either doing a "select count()" before issueing the real query, or reading all rows and count yourself. > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#13865) next »