PHP 4.0 Bug #7495: multiple queries.
| From: | maxim at maxim dot cx | Date: | Fri, 27 Oct 2000 20:19:03 +0000 |
| Subject: | PHP 4.0 Bug #7495: multiple queries. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36137@lists.php.net to get a copy of this message | ||
From: maxim@maxim.cx
Operating system: RH6.2 Linux
PHP version: 4.0.2
PHP Bug Type: MySQL related
Bug description: multiple queries.
Hello Developers,
this has just come up on PHP-GENERAL mailing list and I went wild testing it.
problem:
if in shell this kind of (MySQL) query works:
UPDATE table SET column=0 WHERE id=1;UPDATE table SET column=0 WHERE id=2;UPDATE table SET column=0
WHERE id=3;UPDATE table SET column=0 WHERE id=4;UPDATE table SET column=0 WHERE id=5;
then why not to make it work in mysql_query() as well?
It gives you an error like this:
MySQL Error: 1064: You have an error in your SQL syntax near ';UPDATE table SET column=0 WHERE
id=2;UPDATE table SET column=0 WHERE id=3;U' at line 1
This could be SO useful!...
Just think about all these loops we often have to do in order to generate a similar query.. and we
are still putting mysql_query() on each loop....
Thanks,
Maxim Maletsky.
--
Edit Bug report at: http://bugs.php.net/?id=7495&edit=1