note 26168 added to function.mysql-query
| From: | mars at planet-d dot net | Date: | Mon, 21 Oct 2002 11:17:28 +0000 |
| Subject: | note 26168 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38352@lists.php.net to get a copy of this message | ||
Considering the few lines of code i posted on this page on January 28th 2002, intent on evaluating
several queries at once by splitting the text sent to the function at every ; encountered , *there
is a huge mistake* : of course, the function will crash as soon as there will be a ; inside a
'textfield'.
example :
select * from one_table where one_field='blah;blah';
the function will try to make mySQL to evaluate
select * from one_table where one_field='blah;
and then
blah';
...both incorrect...
I think there is no simple way to get around this, so please note this function may only be used if
you remove any ; from every field of a query before sending it to the fuction, which is not so
clean...
--
http://www.php.net/manual/en/function.mysql-query.php
http://master.php.net/manage/user-notes.php?action=edit+26168
http://master.php.net/manage/user-notes.php?action=delete+26168
http://master.php.net/manage/user-notes.php?action=reject+26168