my database field format is datetime, and HTML form input type is 'text'. how come I cannot extract the correct range?
I also tried <= and >=
neither returns correct results?
$start=$_POST['start'].' 00:00:00';
$end=$_POST['end'].' 23:59:59';
$start=date('Y-m-d H:i:s',strtotime($start));
$end=date('Y-m-d H:i:s',strtotime($end));
...
$sql="select * from table where paytime BETWEEN '".$end."' AND '".$start."'";
I also tried <= and >=
neither returns correct results?