> -----Original Message----- > From: Lang Sharpe [mailto:lang@myself.com] > Sent: 08 May 2003 02:47 > > > I'm trying to use bind variables in my php code. This first > script works, > giving the correct result. > > <php > $oradb = OCILogon('php','***','canxdata'); > > $custStmt = OCIParse($oradb,'SELECT co_code, cust_type, > customer_flags, ' . > 'email_address, user_view FROM customer ' . > 'WHERE \'LANG\' = logon_id'); This WHERE clause looks suspicious to me. Which is your column name and which the value it's looking for? Are you sure you don't mean 'WHERE logon_id=\'LANG\''); ? > > But The following script doesn't return a row; > > <?php > $oradb = OCILogon('php','newplace','canxdata'); > > $custStmt = OCIParse($oradb,'SELECT co_code, cust_type, > customer_flags, ' . > 'email_address, user_view FROM customer ' . > 'WHERE :logonid = logon_id'); And this pretty much confirms it -- the syntax is WHERE column-name = expr so I'm suspecting you mean 'WHERE logon_id=:logonid' which will work fine. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php