Jump to content

PHP SQL SORT CODE


MSUK1

Recommended Posts

Hello,

 

i have a user entering dates in the format

 

DD-MM-YYYY --> 11-12-02

 

when i try to sort by DESC [nearest date first] i am getting sort problems for example i'll get this..

 

11-12-02

12-07-02

13-08-02

 

whats the best way to sort this to get the dates correct?

 

What datatype do you use in your database?

 

Cheers.

Link to comment
https://forums.phpfreaks.com/topic/231867-php-sql-sort-code/#findComment-1192903
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.