Re: OCIBindByName Help Needed

From: Date: Mon, 20 Oct 2003 19:28:54 +0000
Subject: Re: OCIBindByName Help Needed
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31204@lists.php.net to get a copy of this message
>> ORA-01036: illegal variable name/number Make sure that the variable being bound is in the sql statement. -- Jon Kriek http://phpfreaks.com "Roger Spears" <roger@bgnet.bgsu.edu> wrote in message news:3F9435B5.70905@bgnet.bgsu.edu... > Hello, > > I've been working on this all day. I'm trying to insert some text > ($essay) into a CLOB field (essay) in my table (clob_test). > > Can someone please tell me why the following PHP code returns ORA-01036: > illegal variable name/number? Better yet, please tell me how to fix it?? > > $DB_Resource = OCIPLogon($user,$pass,$db); > > $Clob = OCINewDescriptor($DB_Resource, OCI_D_LOB); > > $Query_Resource = OCIParse($DB_Resource, "INSERT INTO clob_test > (firstName,lastName,essay) VALUES ('Roger','Dodger','$essay')"); > > OCIBindByName($Query_Resource, ':essay', &$Clob, -1, OCI_B_CLOB); > > OCIExecute($Query_Resource, OCI_DEFAULT); > > $Clob->free(); > > OCIFreeStatement($Query_Resource); > > Please help preserve my sanity, > Roger >

« previous php.db (#31204) next »