Dan Nelson wrote:
> In the last episode (Nov 30), Alex Gemmell said:
>>I tried splitting up the queries to see if it helped but it didn't
>>$query1 = "CREATE TEMPORARY TABLE tmpSubquery
>> SELECT * FROM tblactivities
>> WHERE Assignment_ID='".$row['Assignment_ID']."'
>> ORDER BY Date DESC LIMIT 10;";
>>query2 = "SELECT * FROM tmpSubquery ORDER BY Date ASC;";
>>$result_activities = mysql_query($query2);
>>query3 = "DROP TEMPORARY TABLE tmpSubquery;";
> How do you know it didn't work? What error message are you getting?
The error I get whichever way IO tried it was the same:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in C:\alexg\newcs\phpinc\status-Trans.php on line 72
The line number always correlated to this bit of PHP code:
$result_activities = mysql_query($query);
Experience tells me this error can mean anything from "no rows in table
to return" to "the query didn't work at all". There's defo data there
to be returned, I'm sure this query just needs tweaking.