Re: - Can't chain sql together with semi-colon
| From: | Stig S. Bakken | Date: | Mon, 09 Sep 2002 23:26:13 +0000 |
| Subject: | Re: - Can't chain sql together with semi-colon | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2274@lists.php.net to get a copy of this message | ||
Hi,
The semi-colon has no meaning in regular queries, it's only used in the
interactive "mysql" command.
- Stig
On Mon, 2002-09-02 at 04:33, Matt Friedman wrote:
> How come I can do this:
>
> $sql = " UPDATE some update sql here";
> $result = $this->db->query($sql);
> $sql = " UPDATE some more update sql here";
> $result = $this->db->query($sql);
>
> but if I try to do this:
>
> $sql = " UPDATE some update sql here; UPDATE some more update sql here
> ";
> $result = $this->db->query($sql);
>
> I get a syntax error?
>
> I've been trying to chain together sql statements using a semi-colon but
> mysql always seems to give an error.
>
> What's going on?
>
> Thanks.
>
> Matt Friedman
>
>
>
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway
http://pear.php.net/wishlist.php/ssb