嗨,我有一个表,我希望在其中搜索以前的记录,我有带搜索选项的选择框这里是代码
if (isset($_REQUEST['searchtype']) && isset($_REQUEST['period']))
{
if ($_REQUEST['searchtype'] == "All")
{
$period = "All";
}
elseif ($_REQUEST['searchtype'] == "Last24hours")
{
$period = date('Y-m-d H:i:s')-86400;
}
elseif ($_REQUEST['searchtype'] == "Last10days")
{
$period = date('Y-m-d H:i:s')-864000;
}
elseif ($_REQUEST['searchtype'] == "LastHour")
{
$period = date('Y-m-d H:i:s')-3600;
}
elseif ($_REQUEST['searchtype'] == "Lastweek")
{
$period = date('Y-m-d H:i:s')-604800;
}
elseif ($_REQUEST['searchtype'] == "LastMonth")
{
$period = date('Y-m-d H:i:s')-2592000;
}
else
{
$period = $_REQUEST['searchtype'];
}
我该怎么做...