MYSQL - to order timestamp values ​​in order, from the newest to the oldest?

I ran into a problem while trying to sort certain results by their label.

I would like these results to be displayed from the newest to the oldest based on the timestamp values.

So, to explain this, imagine there were 3 results:

2012-07-11 17:34:57
2012-07-11 17:33:28
2012-07-11 17:33:07

This result set will be what I need, but given the following query

SELECT timestamp
FROM randomTable
ORDER BY timestamp ASC

I get:

2012-07-11 17:34:57
2012-07-11 17:33:07
2012-07-11 17:33:28

This is how it is sorted by a numerical value, and 07- by 28.

If I sort in descending order, I get

2012-07-11 17:33:07
2012-07-11 17:33:28
2012-07-11 17:34:57

This is what I'm looking for ... But it's the other way around.

So my question is pretty simple, how could I sort these values ​​in ascending order, as I described?

EDIT:

The problem

EDIT2:

CREATE TABLE `user_quotations` (
 `id` int(100) NOT NULL AUTO_INCREMENT,
 `quoteNumber` int(100) NOT NULL,
 `lastModified` datetime NOT NULL,
 `userId` int(100) NOT NULL,
 `manufacturer` varchar(250) COLLATE latin1_general_ci NOT NULL,
 `modelNumber` varchar(250) COLLATE latin1_general_ci NOT NULL,
 `productDesc` varchar(1000) COLLATE latin1_general_ci NOT NULL,
 `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 KEY `quoteNumber` (`quoteNumber`,`lastModified`,`userId`,`manufacturer`,`modelNumber`,`timestamp`),
 KEY `productDesc` (`productDesc`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
+5
source
4

:

SELECT timestamp
FROM randomTable
ORDER BY timestamp ASC;

. , . :

2012-07-11 17:34:57
2012-07-11 17:33:07
2012-07-11 17:33:28

sqlbox :

2012-07-11 17:34:57
2012-07-15 17:33:07
2012-07-15 17:33:28

.

?
, :

SELECT timestamp( `timestamp` ) as 'timestamp'
FROM randomTable
ORDER BY 1 ASC;
+10

create . , timestamp .

Show create table tablename;
+4

:

select q.`timestamp`
from user_quotations as q
order by q.`timestamp`
limit 30

.

, . / , ..

+1

15- 11-. , .

+1

All Articles