doddsey_65 Posted April 4, 2010 Share Posted April 4, 2010 How would i display the 4 newest records of a database? Im guessing the $date = now() function is involved but how would i get it to show the 4 newest? I was thinking of showing the newest by using the now() function by doing something like now() -4 or something like that to show the newest in the last 4 days but if there arent any then it would be blank. Link to comment https://forums.phpfreaks.com/topic/197560-showing-4-newest/ Share on other sites More sharing options...
The Little Guy Posted April 4, 2010 Share Posted April 4, 2010 SELECT * FROM tbl_name ORDER BY date DESC LIMIT 4 Link to comment https://forums.phpfreaks.com/topic/197560-showing-4-newest/#findComment-1036836 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.