Reputation: 3163
$query = "SELECT * FROM websites WHERE url LIKE '%.nl/' OR '%.com/' OR '%.org/' ORDER BY views DESC";
Outputs:
Where is this coming from?..
Upvotes: 0
Views: 66
Reputation: 219814
Views is apparently a string so it is being sorted as a string. You will need to cast that field to an INT before using it for sorting purposes (and you should change the data type to INT permanently).
Upvotes: 5