Hi All!

I am using MySQL 3.23.29a-gamma server and interfacing with PHP4.

Using the following from    mysql -u Some_ID -p  Some_Password  , all works
out just fine:

=======SNIP=======
use mydatabase;
CREATE TEMPORARY TABLE GACK1 select * from questions SORT  ;
=======SNIP=======
I can then  "select * from GACK1" and find the expected records.


HOWEVER, if using my interface I do this:
=======SNIP=======
$Gack1=MYSQL_QUERY("CREATE TEMPORARY TABLE GACK1 select * from questions
SORT  ");
$Gack=MYSQL_QUERY("select * from gack1");

and then a
"$row = mysql_fetch_array($Gack1)"  OR  "$row = mysql_fetch_array($Gack)"
=======SNIP=======
I  am given a message that the resource doesn't exist (I take this to mean
that my queries are not generating any results, or are in error).



YET this works just fine:
=======SNIP=======
$Gack1=MYSQL_QUERY("select * from questions SORT  ");
then a $row = mysql_fetch_array($Gack1)
=======SNIP=======

To summarize, the difference between the one that works and the one that
dies is that the non-functional query includes the words "create temporary
table tablename" prefacing the select.   It works on a command line
interface, but not otherwise. . .

Does anyone have an idea as to what I am doing wrong?

Thanks for your time!

Cheers!

-Warren



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to