mysql> select date,category from sms_toto where date like '2012-01-07%' order by date desc; +---------------------+----------+ | date | category | +---------------------+----------+ | 2012-01-07 19:53:03 | t3d | | 2012-01-07 19:53:03 | 8to3d | | 2012-01-07 19:50:36 | t56 | | 2012-01-07 19:50:36 | 8to56 | | 2012-01-07 19:49:00 | TOT | | 2012-01-07 19:49:00 | MPT | | 2012-01-07 19:48:59 | 8MPT | | 2012-01-07 19:48:59 | 8TOT | | 2012-01-07 19:48:59 | POR | | 2012-01-07 19:48:59 | POT | | 2012-01-07 19:46:01 | mgm | | 2012-01-07 19:46:01 | mpt | | 2012-01-07 19:46:01 | POM | | 2012-01-07 19:46:01 | POR | | 2012-01-07 19:46:01 | 8MGM | | 2012-01-07 19:46:01 | 8MPT | | 2012-01-07 19:44:22 | scs | | 2012-01-07 19:44:22 | POW | | 2012-01-07 19:44:22 | 8scs | | 2012-01-07 19:44:14 | stc | | 2012-01-07 19:44:14 | 8stc | | 2012-01-07 19:44:02 | l4d | | 2012-01-07 19:44:02 | pos | | 2012-01-07 19:44:02 | 8l4d | | 2012-01-07 19:43:55 | 8l3d | | 2012-01-07 19:43:55 | l3d | | 2012-01-07 19:43:44 | pmp | | 2012-01-07 19:43:44 | mpt | | 2012-01-07 19:43:43 | POD | | 2012-01-07 19:43:43 | POR | | 2012-01-07 19:43:43 | 8pmp | | 2012-01-07 19:43:43 | 8mpt | +---------------------+----------+ 32 rows in set (0.03 sec) mysql>