RE: [PHP-DB] multiple mysql query in PHP mysql_query?

From: Date: Fri, 08 Nov 2002 22:01:03 +0000
Subject: RE: [PHP-DB] multiple mysql query in PHP mysql_query?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23162@lists.php.net to get a copy of this message
> Hi, Can anybody give me a simple example of using > PHP's mysql_query to perform mulitple mysql queries. > I am using MySQl 3.23, trying to use create temporary > table and insert ... select to overcome the lack of > union operation in that verion of MySQL. > Thanks! Mysql_query() can only do one query at a time... $result1 = mysql_query("CREATE TEMPORARY TABLE MyTemp(PRIMARY KEY(id)) SELECT id FROM MAIN WHERE ... "); $result2 = mysql_query("INSERT INTO MyTemp (id) VALUES (9999)"); $result3 = mysql_query("SELECT ... "); ---John Holmes...

« previous php.db (#23162) next »