Jump to content

[SOLVED] Help needed with structuring a query.


Solarpitch

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.