Re: running multiple updates on a single line

From: Date: Fri, 07 Jul 2006 21:17:34 +0000
Subject: Re: running multiple updates on a single line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-239207@lists.php.net to get a copy of this message
On Mon, July 3, 2006 8:29 pm, Ryan A wrote: > 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? PHP MySQL client disallows that as a crude stop for some SQL injection attacks. I believe that upcoming MySQL client libraries may put it back in. mysqli might even have it already. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#239207) next »