* Alex Behrens
> quick question, I'm setting up a script that does headlines for
> my site and I need to pull some information from a table with
> my review info from it but I only want to view the 7 latest
> reviews, how do I make it so I can only view like 7 highest
> values for the "num" column?
>
> my query is this:
> $r = mysql_query("SELECT * FROM hwureviews LIMIT
> (MAX(num)-7),7"); Does this work or am I way off?
You can't use a function in the LIMIT clause, try this:
SELECT * FROM hwureviews ORDER BY num DESC LIMIT 7
--
Roger
---------------------------------------------------------------------
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