Re: multiple queries in the same "request"
| From: | Bruno Ferreira | Date: | Mon, 20 Jun 2005 16:40:03 +0000 |
| Subject: | Re: multiple queries in the same "request" | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39713@lists.php.net to get a copy of this message | ||
Gabriel B. wrote:
-- Bruno FerreiraYou can't send multiple queries in an SQL statement. You can just split that in two separates queries. It's not really slower by anyI'm not really concerned about performance. i'm *really* concerned about race conditions. I have more than 3mi hits per day. the chance that two pairs of queries will run consecutively is imense. Then you need to use transactions, which fill your purpose :) I presume you're using MySQL or Postgres, google for START TRANSACTION and COMMIT.