Basically what I am trying to do is show the results from my database, broken up under the heading of the month they belong to, I have done a few searches and tried the examples, but I just can't get it working perfectly, what I am trying to get it to do is display like this...
March
Result 1
Result 2
April
Result 3
May
Result 4
Result 5
Result 6
Using advice in another thread I created a "months" table listing the months, I have grouped with my results table which looks like this.
tid
start_date
end_date
data
The best I can do is get it to display the month names, but it will only show 1 result per month, instead of up to 2 - 4 results.
Here is the query I am using on my local machine to test it.
"SELECT trips.*, months.*
FROM trips
RIGHT OUTER JOIN months ON months.month = monthname(trips.start_date) WHERE trips.tid = '$tid' GROUP BY monthname(trips.start_date) ORDER BY trips.start_date");
If someone could point out what I am doing wrong it would be much appreciated.