Data From 2 Tables in one Query?
Hi all,
For my Toplist hack, I am implementing a rating system for it, and need to show the average rating of each of the sites on the main page. I am not sure how to do this, because the rating data is in a separate table. I know how to get the average, but don't know how to get it on the main page, which uses a while loop to show all the sites in the Toplist.
The database structure is like this:
Table: toplist_sites
`id`
`username`
`name`
`url`
`description`
`image`
`in`
`out`
`status`
Table: toplist_ratings
`id`
`site_id`
`username`
`rating`
Any help is appreciated.
Thanks,
Derek
|