virtuexru Posted April 2, 2007 Share Posted April 2, 2007 OK. So I have the date set in my database under DATE How would I go about only giving the results for say.. March using this, like how would I specify what date to start at.. should I use while($date > 03-01-07) or something? <?php $display = "SELECT id, date FROM postlist ORDER BY id DESC LIMIT $offset, $rowsPerPage"; $result = mysql_query($display) or die(mysql_error()); ?> Link to comment https://forums.phpfreaks.com/topic/45313-archiving-using-date/ Share on other sites More sharing options...
emehrkay Posted April 2, 2007 Share Posted April 2, 2007 i would think you do that in the query using BETWEEN SELECT ... WHERE date_field BETWEEN start AND END ... ORDER ..etc" Link to comment https://forums.phpfreaks.com/topic/45313-archiving-using-date/#findComment-220001 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.