note 26168 deleted from function.mysql-query by nicos

From: Date: Mon, 21 Oct 2002 12:20:18 +0000
Subject: note 26168 deleted from function.mysql-query by nicos
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38356@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...

« previous php.notes (#38356) next »