Re: parallel execution of php code?
| From: | Martin van den Berg | Date: | Tue, 09 Aug 2005 13:46:22 +0000 |
| Subject: | Re: parallel execution of php code? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-220288@lists.php.net to get a copy of this message | ||
> I have lots of places where I used to do this. Since MySQL 4.1 I've
> changed it to something like:
>
> "INSERT INTO mytable SET id = 123, bla = '$x' ON DUPLICATE KEY UPDATE
> bla='$x'"
>
> This saves you a query, and makes it easier to isolate the insert/
> update as it will play nicely with autocommit.
>
Neat construction but in my case, id is an auto-increment field... so
I guess your example won't work since I never get a duplicate key.