note 10201 added to mysql_query
| From: | uioreanu at hotmail dot com | Date: | Tue, 19 Dec 2000 10:39:09 +0000 |
| Subject: | note 10201 added to mysql_query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8898@lists.php.net to get a copy of this message | ||
Hello,
If you have more than one semicolon sepparated queries you may split your query something like
this:
$Str_BigSQLQuery= trim($Str_BigSQLQuery);
$Arr_Query = split(";", $Str_BigSQLQuery);
reset ($Arr_Query);
while ( list($k,$v) = each ( $Arr_Query ) )
{
if ($v && $v !=" ") $con->ExecQuery($v);
}
unset ($Str_BigSQLQuery);
where $con is the mysql object, ExecQuery mysql_query method.
Regards,
Uioreanu Calin
http://www.php.net/manual/function.mysql-query.php