Jump to content

[SOLVED] get records from only 30 days back


DrTrans

Recommended Posts

I need some help .. Basically i only want it to get records dated within the last 30 days

 

$query = "SELECT * FROM applicant ORDER BY AppliedDate  DESC";
        $result = mysql_query($query);
        while($row = mysql_fetch_assoc($result))
	{
	    $applicantid = $row['Applicant_ID'];
	    $applicantdate = $row['AppliedDate'];
	    list($adate,$time) = split( " ", $applicantdate, 2 );
		$applicantfname = $row['FirstName'];
	    $applicantlname = $row['LastName'];

print"<option value=\"$applicantid\">$applicantlname, $applicantfname [ $adate ]</option>";			

}
[code]

This im sure is a simple fix. 

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.