Re: [Sqlrelay-discussion] bind pear php module
Brought to you by:
mused
From: david f. <df...@vi...> - 2005-05-20 15:56:16
|
That would be very nice. Thanks for your work livingdead Le Fri, 20 May 2005 11:40:42 -0400, Firstworks/4access <dav...@fi...> a écrit: > Ahh, I see. > > I'll have to look into this a bit further. Maybe I can get SQL Relay to > support ?'s in short order. > > Dave > > On Fri, 2005-05-20 at 17:15 +0200, david forums wrote: >> Sorry but I'm not the manager of those question mark, it's PEAR DB who >> set >> those question mark automatically, when we are using autoExecute >> functions. >> >> So I do not know how to change it in PEAR DB, and How it will not break >> the portability of PEAR DB >> >> regards >> >> livingdead >> >> >> >> >> >> Le Fri, 20 May 2005 10:57:29 -0400, Firstworks/4access >> <dav...@fi...> a écrit: >> >> > SQL Relay uses Oracle-style bind variables, so try using: >> > >> > INSERT INTO myTable (col1,col2,col3) VALUES (:1,:2,:3) >> > >> > and see if that doesn't work better (using the original code for the >> > execute function). >> > >> > Supporting ?'s is on the TODO list, but I haven't implemented it yet. >> > >> > Dave >> > dav...@fi... >> > >> > On Fri, 2005-05-20 at 16:12 +0200, david forums wrote: >> >> Hello >> >> >> >> so Here is the request >> >> >> >> $db->autoExecute("myTable", $lstField, DB_AUTOQUERY_INSERT); >> >> >> >> this build the several request (inside PEAR DB) >> >> INSERT INTO myTable (col1,col2,col3) VALUES (?,?,?) >> >> >> >> But it seems that when it reach the execute fonction, it's not able >> to >> >> fill the ?, with the right data. >> >> Analysing the function I discover this : >> >> >> >> function &execute(&$sqlrcursor, $data = false) >> >> { >> >> sqlrcur_clearBinds($sqlrcursor->cursor); >> >> if ($data) { >> >> while ($element = current($data)) { >> >> $index = key($data); >> >> sqlrcur_inputBind($sqlrcursor->cursor, $index, >> >> $data["$index"]); >> >> next($data); >> >> } >> >> } >> >> .......... >> >> >> >> I try to modify it like : >> >> function &execute(&$sqlrcursor, $data = false) >> >> { >> >> sqlrcur_clearBinds($sqlrcursor->cursor); >> >> if ($data) { >> >> while ($element = current($data)) { >> >> $index = key($data); >> >> if(is_numeric($index)) $index = "?"; >> >> sqlrcur_inputBind($sqlrcursor->cursor, $index, >> >> $data["$index"]); >> >> next($data); >> >> } >> >> } >> >> .......... >> >> >> >> without success. >> >> >> >> Please thanks for your help >> >> >> >> livingdead >> >> >> >> >> >> ------------------------------------------------------- >> >> This SF.Net email is sponsored by Oracle Space Sweepstakes >> >> Want to be the first software developer in space? >> >> Enter now for the Oracle Space Sweepstakes! >> >> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click >> >> _______________________________________________ >> >> Sqlrelay-discussion mailing list >> >> Sql...@li... >> >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> >> >> > >> > >> > >> > ------------------------------------------------------- >> > This SF.Net email is sponsored by Oracle Space Sweepstakes >> > Want to be the first software developer in space? >> > Enter now for the Oracle Space Sweepstakes! >> > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click >> > _______________________________________________ >> > Sqlrelay-discussion mailing list >> > Sql...@li... >> > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> > >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by Oracle Space Sweepstakes >> Want to be the first software developer in space? >> Enter now for the Oracle Space Sweepstakes! >> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_idt12&alloc_id344&op=click > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |