Hi, I'm running mysql version 4.0.13 and trying to create a temporary table from a php script. For some reason, even though I have the permission set up correctly, I can't seem to create a temporary table from the script. The permission say that create_tmp_table_priv=Y for the user in my connection code below. I have no problem creating the temp table with the same sql syntax directly in the mysql command interface and no problem creating a regular table using php?
The sql I'm trying to execute is in the following code" $dblink= mysql_connect('localhost','pi', 'plant') or die ("<P>Problem with My SQL connection.</P>\n") ; mysql_select_db('plant_inventory') or die ("<P>Problem with connection to the database: plant_inventory.</P>\n"); $sql = "CREATE temporary TABLE tmpInventory "; $sql .= " SELECT * FROM inventory WHERE 1=0;"; $create_tmp = mysql_query($sql) or $err=("temp table not created"); Any ideas why this might be happening? Anya Miretsky Computer Technology Dept. Brooklyn Botanic Garden 1000 Washington Avenue Brooklyn, NY 11225 (718)623-7265 [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]