Re: MySQL query
| From: | Tyler Longren | Date: | Mon, 22 Apr 2002 20:20:32 +0000 |
| Subject: | Re: MySQL query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94051@lists.php.net to get a copy of this message | ||
I'm not sure how PHP would handle this, but have you tried this:
mysql_query("UPDATE sampcomp SET fg='N', pctd='69',
maxpctd='69.1' WHERE
sampcompid='3';UPDATE sampcomp SET fg='N', pctd='69.2',
maxpctd='69.3'
WHERE sampcompid='2'");
??
I doubt you can put multiple queries in one execution of mysql_query().
It's worth a shot though.
Tyler Longren
Captain Jack Communications
www.captainjack.com
tyler@captainjack.com
----- Original Message -----
From: "Lee P Reilly" <lreilly@lanl.gov>
To: "PHP List" <php-general@lists.php.net>
Sent: Monday, April 22, 2002 3:07 PM
Subject: [PHP] MySQL query
> Hi,
>
> Can someone tell me if there is a way to execute multiple MySQL
> statements by passing *one* query containing a number of individual
> statements to MySQL e.g.
>
> UPDATE sampcomp SET fg="N", pctd="69", maxpctd="69.1" WHERE
> sampcompid="3";UPDATE sampcomp SET fg="N", pctd="69.2",
> maxpctd="69.3"
> WHERE sampcompid="2";
>
> And just return FALSE if one of the queries cannot be executed? Just
> curious...
>
> Cheers,
> Lee
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>