> 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...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to