MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Brian Dunning Date:October 23 2005 7:00pm
Subject:Temp table doesn't seem to work
View as plain text  
If I say this, I get all my data:

<?php
$sql = "select * from myTable;";
$result = mysql_query($sql);
?>

But if I say this, I get no results at all:

<?php
$sql = "create temporary table xxx select * from myTable;";
$result1 = mysql_query($sql);
$sql = "select * from xxx";
$result2 = mysql_query($sql);
?>

Seems pretty straightforward. What am I missing?
Thread
Temp table doesn't seem to workBrian Dunning23 Oct
  • Re: Temp table doesn't seem to workSGreen23 Oct
    • Re: Temp table doesn't seem to workBrian Dunning24 Oct
      • Re: Temp table doesn't seem to workSGreen24 Oct