I hope someone can point me to the error in this query as I have spent hours already with no result finding it.
What I would like to achieve is querying table1 (content) and table2 (content-ratings) and sort them by rating
I have this query made:
$sql="SELECT A.*,B.* FROM table1 A, table2 B where A.type='approved' and (A.id like B.id) and (A.title like '%$search_id%' or A.keyword like '%$search_id%' or A.description like '%$search_id%') order by B.total_value desc limit $startfrom, $config[items_per_page]";
Any help is appreciated!