Hi,
I want to do the following:
I have a form which posts data into a mySQL database. This data is about certain events taking place, and included in the data is information on when each event is taking place. Currently I have (among others) three form fields:
- day
- month
- year
When grabbing the data from the database, I want to sort the events by date. So my guess is I should either
a) throw together the three form field values, upon submitting, into one variable $date, and use the SQL "SORT BY date DESC" to sort the events by date. But I don't have a clue how to submit three form fields into one variable.
b) use the SQL function CONCAT() to concatenate the day, month and year variables and then sort them by this new variable somehow. But I have even less idea how to do this.
Of course, there probably is a better way to do this, but I'm unaware of it at the moment. So any help would be greatly appreciated!
TIA,
Alwyn