"Edison Cneeden" <[EMAIL PROTECTED]> wrote: > Hi there, > > When i try to do the following in PHP I get errors. Is this not permitted or > is this due to a setting somewhere? Can i do only one SQL statement per call > to mysql_query?
Yes. > > $sql = "CREATE TEMPORARY TABLE tmp > SELECT field1_index, field2_index FROM test_table WHERE field1_index = '1'; > INSERT INTO tmp > SELECT field1_index, field2_index FROM test_table WHERE field2_index = '1'; > SELECT * from tmp; > DROP TABLE tmp;"; > > $res = mysql_query($sql); > > _________________________________________________________________ > > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]