hello guys,
please give me any idea about solving this problem.
I have two tables
categories:
id .... category .... parent
________________________________
1 .... general .... 0
2 .... news .... 0
news:
id .... headline .... category_id
________________________________
1 .... headline1 .... 1
2 .... headline2 .... 2
3 .... headline3 .... 2
4 .... headline4 .... 1
and I have this MYSQL code
SELECT * FROM news INNER JOIN categories ON news.category_id=categories.id group by category_id,date
now I want to fetch rows based on category
so I get result like this:
general category:
headline1
headline4
news category:
headline2
headline3
please help me with this guys :)