Basically I have a lot of data in a table and its creation date with it. I want to show all of the data from the table, however in its output it need to be in date order, and then with a heading of the month it was created in above it.
i.e.
January
data1
data2
data3
February
data4
data5
March
data6
data7
data8
data9
Is this possible from one query? I’m using php and mysql.
Thanks
Table Layout will be something like:
ID | Type | Content | User | Colour | Creation Date
It’s all theory at the moment, but I will be creating it later today and tomorrow. I just needed to know if it’s possible.
I’d simply add the month to the query, order the query by date, and then track the month during the output phase and insert a new heading every time the month changes:
In the PHP: