hey, I have a table in my database that has these 3 fields: "payroll_id", "from_date", "to_date" and I need to pull out the record that today's date is between from_date and to_date. how can I do that? either in sql or some php code. please help!
Rooin.
<? $today=date('m/d/Y', mktime());
$sql="SELECT * from TheTable WHERE from_date<'$today' AND to_date>'$today'";
$result=sql_query($sql);
?>
Given the smattering of information you've given, I'd presume something like the above...
-Ben