I have one table called 'PAGES' and another called 'ratings'.
I want to sort the results of 'PAGES' by how well it is rated in the 'ratings' table.
The 'PAGES' table has an ID field which is auto-incrementing, and the 'ratings' table has an ID field that contains the ID number of the PAGES table.
Finally, the ratings table has a field called 'total_value' which contains the rating score.
So I currently have,
$SQL = "SELECT * from PAGES ORDER BY ID DESC LIMIT 10";
how do I code this?
thanks
-Arron