I have works in tbl_works with tbl_works.id as primary key. Then I have table named tbl_rating that has tbl_rating.rate and tbl_rating.work_id, that is linked with 1:M with tbl_works.id.
tbl_works.id ----1 : M---- tbl_rating.work
tbl_rating.rate
Is it possible, that I would with one SQL query (I could do this with storing data in array with PHP) output the works sorted DESCending to average rating?
Thank you very much in advance.
Rastko
tbl_works.id ----1 : M---- tbl_rating.work
tbl_rating.rate
Is it possible, that I would with one SQL query (I could do this with storing data in array with PHP) output the works sorted DESCending to average rating?
Thank you very much in advance.
Rastko