revdb_execute problem

jbv jbv.silences at club-internet.fr
Fri Aug 17 04:16:10 EDT 2007


Hi list,

I'm trying to squeeze more than one SQL commands into 1 single
revdb_execute
request in a Rev cgi script.
For instance :

    UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; UPDATE myTable
SET N = N + 1 WHERE id = 2 LIMIT 1 ;

I've tried all possible ways, like this one :

   put "UPDATE myTable SET N = N + 1 WHERE id = 1 LIMIT 1 ; " into
myREQUEST
   put "UPDATE myTable SET N = N + 1 WHERE id = 2 LIMIT 1 ;" after
myREQUEST
   put revdb_execute(theID, myREQUEST) into tQueryResult

The first SQL command executes fine, but I get a syntax error message
from mySQL regarding the
2nd SQL command.

But when I paste the same set of 2 SQL commands into phpMyAdmin, then it
works !!!

Any idea of what I could be missing ?
The doc doesn't mention any limitation regarding the SQLQuery parameter
of revdb_execute...

I'm using Rev cgi 2.5, mySQL 4.0.15 and phpMyAdmin 2.6.0

Thanks,
JB




More information about the use-livecode mailing list