Solarpitch Posted June 17, 2008 Share Posted June 17, 2008 Hey guys, I have the below MySQL query $sql = "select * from portal_article where article_cat = 'Club News' AND clubnumber = 9005 ORDER BY article_id desc"; but I need to add another piece which will select articles that are within 30 days old... DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= article_timestamp How can I combine both of these queries together? Thanks. Link to comment https://forums.phpfreaks.com/topic/110543-solved-help-needed-with-structuring-a-query/ Share on other sites More sharing options...
fenway Posted June 17, 2008 Share Posted June 17, 2008 Use add it to the where clause... with AND. I assume you tried and it didn't work? Link to comment https://forums.phpfreaks.com/topic/110543-solved-help-needed-with-structuring-a-query/#findComment-567332 Share on other sites More sharing options...
Solarpitch Posted June 17, 2008 Author Share Posted June 17, 2008 Sorry.. I did at first but structured it wrong... it works now tho. Thanks Link to comment https://forums.phpfreaks.com/topic/110543-solved-help-needed-with-structuring-a-query/#findComment-567488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.