Pulling Records from database after a certain date
I have the following code that pulls all the records from the database by date and displays on a web page, I would like to only pull the records after 9/01/2003, any suggestions on how to modify the following code:
$select = "select * from programs";
$where = " where type='1' and (((MONTH(NOW()) = month and DAYOFMONTH(NOW()) >= day) or (MONTH(NOW()) > month)) and (YEAR(NOW()) = year) or (YEAR(NOW()) > year))";
$group = " order by year DESC, month DESC ,day DESC";
$dbg = database();
$db->query("$select $where $group" );
Any help is greatly appreciated.
Subject
Written By
Posted
Pulling Records from database after a certain date
April 11, 2006 11:00AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.