note 42486 added to function.mysql-query
| From: | samm at os2 dot ru | Date: | Tue, 18 May 2004 18:15:57 +0000 |
| Subject: | note 42486 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69783@lists.php.net to get a copy of this message | ||
Small correction to the klync post (18-Jan-2004 09:05)
instead
foreach ( explode(";", "$sql_query") as $sql_line) {
its better to use
foreach ( explode(";\n", "$sql_query") as $sql_line) {
to avoid errors on strings lines like:
INSERT INTO
cms_text VALUES ('test; test');
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42486
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42486&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42486&report=yes
Search -- http://master.php.net/manage/user-notes.php