Try making your select statement into:
SELECT * FROM dives ORDER BY date DESC
replace date with the name of the field that holds the dates in your dives table, and also you can change DESC to ASC depending on which order you want it.
Let me know if it doesn't work.
scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140
scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140
This is how you convert date strings from DDMMYY to YYMMDD:
$userinput; //lets assume this variable has a date in DDMMYY format
$format = "y/m/d"; //this is the format we are going to tell date to output the string in. y , d and m will output 2 digit representations of year day and month repectively (case sensitive).
$timestamp = strtotime($userinput); //get a Unix timestamp from the user input so we can use it with the date function.
$new_date = date($format, $timestamp); //$newdate is now a string formatted YY/MM/DD
scru
Posting Virtuoso
1,629 posts since Feb 2007
Reputation Points: 975
Solved Threads: 140