Re: multiple queries with PHP
| From: | John W. Holmes | Date: | Fri, 05 Sep 2003 18:51:04 +0000 |
| Subject: | Re: multiple queries with PHP | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-30371@lists.php.net to get a copy of this message | ||
John Ryan wrote:
I want to SELECT * from a table and also update the hit counter by 1. So theres 2 different queries which I know I can easily do in PHP seperately, but I thought itd be quicker and more efficient to run them in the same query, ie seperated by a ';'. But PHP returns an error, and it works fine on the command line. I read somewhere thats its a security risk in PHP to allow 2 queries, so its turned off by default. Is this true?Yes. Also, just because you can fit something onto one line it doesn't mean it's more efficient. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com