Ryan A wrote:


--- Chris <[EMAIL PROTECTED]> wrote:


Ryan A wrote:

Hi,
in phpmyadmin, in the SQL part where you can write

a

query if I have a double update such as this:


it works without a problem as I am ending each sql
statement with a simicolon, but in my scripts when

I

try to run multiple updates in a single line
eg:
$xyz="update xyz set id=1 where id=0;update xyz

set

id=3 where id=2;";


it does not work... any idea why?



-->Chris
try a newline between the queries then phpmyadmin
will see them as separate queries and run them properly.


@Chris, Tried that... no joy.


-->João

Could any of these lines cousing an error?


@João, nope, I broke them down to different
statements , put them into an array and ran them in a
for() loop and it works perfectly... problem is,
sometimes I have to run upto 15 updates at a time,
would be great if I can run that in one statement.

--> Robert

RTFM :) -- mysql_query()


Ok, read it, again.... what am I missing?
I took out the semicolon from the end... then I get an
error.
I did find one user post saying that this runs just
one query at a time...but if thats the case how is
PHPMyAdmin running multiple statements that are
seperated by a semicolon?

Thanks!
Ryan
because it manually splits them on the semicolon and runs each one trough mysql_query separately.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to