PHP MySQL – DISC LIMIT disables ORDER BY

I am kinda new to MySQL and I am trying to order messages by date. And I also want to show no more than 10 messages. My query:

$sql2 = "SELECT `id`, `Afbeelding`, `Vraag`, DATE_FORMAT(date, '%d-%m-%Y %H:%i:%s') FROM vraagstellen ORDER BY date DISC LIMIT 10";

The order by gets disabled. Anyone who can help me? Thanks!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s