"Miretsky, Anya" <[EMAIL PROTECTED]> wrote:
>
> 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?
Use mysql_error() function to see error message.
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [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]