Re: PHP: mysql_query()
| From: | Ben-Nes Michael | Date: | Tue, 14 Aug 2001 09:10:02 +0000 |
| Subject: | Re: PHP: mysql_query() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62600@lists.php.net to get a copy of this message | ||
You cant do this.
Its even recommended to drop the `;' from the end of the sql command.
You can go around using array to store the sql statements and use foreach to
run mysql_query with thee sql statement.
But I don't think its right way to do thing !
If you intention was to do update one after other then you should use locks
or use Postgres :)
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------
----- Original Message -----
From: "lallous" <elias_bachaalany@yahoo.com>
To: <php-general@lists.php.net>
Sent: Tuesday, August 14, 2001 12:59 PM
Subject: [PHP] PHP: mysql_query()
> Actually the mysql_query() seems to accept only one statement at a time.
>
> Any work around so i can do query suchs:
>
> mysql_query("
> SELECT 1+1;
> SHOW DATABASES;
> USE database1;
> SELECT * FROM table1;
> ");
>
> Just multiple commands seperated with ';' ? (as if using the Mysql command
> prompt)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>