kalin mintchev wrote:
Basically you can't do what you want either without temporary tables or
using a subselect. Subselects are only available in mysql 4.1+ (I think
- check the docs) so that may or may not be an option.

thanks... pardon my ignorance - how would i do that using subselects?

Without knowing your schema this is just a guess but:

select * from records where categoryid=(select categoryid from categories order by last_update desc limit 1);

will get the most recently updated category and match it to the 'records' table.

Actually... That could probably be done as a join:

select * from records r inner join categories c on (r.categoryid=c.categoryid) order by c.last_update desc;

but that will get you all records for that category not just the most recently updated.


Of course I could be on the completely wrong track because you haven't fully described what you're trying to get out and what data you have ;)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to