It is simple in MySql to query some from a table by its ID and order it using another field say "rating"
here is the php code for that


$data = mysql_query(SELECT * FROM (SELECT * FROM table_name ORDER BY ID DESC LIMIT 50) AS ttbl ORDER BY rating ASC;


ttbl is a virtual table or view (I don't know what exactly it is)

Category : , | Read More...... edit post

0 Response to "Limiting results by ID and order by rating"

Post a Comment

Followers

FeedCount

Latest Posts

thecoderinc

Subscribe Now