im trying to select date from mysql between dates with this code
if(isset($_REQUEST['datefrom']) and $_REQUEST['datefrom']!=""){
$condition .= ' AND date LIKE "%'.$_REQUEST['datefrom'].'%" ';
}
if(isset($_REQUEST['dateto']) and $_REQUEST['dateto']!=""){
$condition .= ' AND date LIKE "%'.$_REQUEST['dateto'].'%" ';
}
Please help THX
dateanddatetimecolumn types exist for a reason...use them. And then learn aboutBETWEEN.