List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:November 30 2005 4:26pm
Subject:Re: Rewriting subquery for old MySQL
View as plain text  
In the last episode (Nov 30), Alex Gemmell said:
> I tried splitting up the queries to see if it helped but it didn't
> work either:
> 
> [PHP]
> $query1 = "CREATE TEMPORARY TABLE tmpSubquery
> 	SELECT * FROM tblactivities
> 	WHERE Assignment_ID='".$row['Assignment_ID']."'
> 	ORDER BY Date DESC LIMIT 10;";
> mysql_query($query1);
> 
> query2 = "SELECT * FROM tmpSubquery ORDER BY Date ASC;";
> $result_activities = mysql_query($query2);
> 
> query3 = "DROP TEMPORARY TABLE tmpSubquery;";
> mysql_query($query3);
> [/PHP]

How do you know it didn't work?  What error message are you getting?

-- 
	Dan Nelson
	dnelson@stripped
Thread
Rewriting subquery for old MySQLAlex Gemmell30 Nov
  • Re: Rewriting subquery for old MySQLSGreen30 Nov
    • Re: Rewriting subquery for old MySQLAlex Gemmell30 Nov
      • Re: Rewriting subquery for old MySQLrouvas30 Nov
        • Re: Rewriting subquery for old MySQLAlex Gemmell30 Nov
        • Re: Rewriting subquery for old MySQLAlex Gemmell30 Nov
        • Re: Rewriting subquery for old MySQLSGreen30 Nov
      • Re: Rewriting subquery for old MySQLDan Nelson30 Nov
        • Re: Rewriting subquery for old MySQLAlex Gemmell30 Nov
          • Re: Rewriting subquery for old MySQLMichael Stassen30 Nov
      • Re: Rewriting subquery for old MySQLMichael Stassen30 Nov
        • Re: Rewriting subquery for old MySQL - SOLVEDAlex Gemmell30 Nov
          • Re: Rewriting subquery for old MySQL - SOLVED - correction!Alex Gemmell6 Dec