kalster Posted April 10, 2014 Share Posted April 10, 2014 this code does not sort by timestamp and i need to know why this is not working. $sql = "SELECT * FROM test WHERE y='$y' AND z='$z' ORDER BY timestamp DESC"; this code does sort by timestamp. $sql = "SELECT * FROM test WHERE y='$y' ORDER BY timestamp DESC"; `timestamp` INT(12) NOT NULL, i am using the near resent version of mysql. Link to comment https://forums.phpfreaks.com/topic/287683-timestamp-not-sorting/ Share on other sites More sharing options...
requinix Posted April 10, 2014 Share Posted April 10, 2014 It is sorting. Why do you think it isn't? Link to comment https://forums.phpfreaks.com/topic/287683-timestamp-not-sorting/#findComment-1475729 Share on other sites More sharing options...
kalster Posted April 11, 2014 Author Share Posted April 11, 2014 when z=0 then timestamp was not sorting. maybe because i had more than one field with z=0. i solved this topic by given z a greater value. at my first post, resent should be called recent Link to comment https://forums.phpfreaks.com/topic/287683-timestamp-not-sorting/#findComment-1475743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.