how to group two tables and fetch group by category
Hello everyone,
I have a problem with this code
php:
<?php
$sql = mysql_query("select * from news left join categories on news.category_id = categories.id group by category order by categories.id ");
while($row=mysql_fetch_array($sql)){
?>
the problem is when i fetch array from news and categories table
i get each category has one headline
what i want to do is to include more than one news in each category