我有这个查询!为什么它不起作用?
$start=$_REQUEST['to'];
$end=$_REQUEST['from'];
echo $start1 = strftime('%Y-%m-%d', strtotime($start));
echo $end1 = strftime('%Y-%m-%d', strtotime($end));
echo $data = mysql_query( "select * from cdr
WHERE DATE(calldate) BETWEEN '$start1' AND '$end1';
")
我的意思是 $date_get 的输出是: 20121203 ,它应该可以工作。如果我设置它会起作用:
echo $data = mysql_query( "select * from cdr
WHERE DATE(calldate) BETWEEN'20121201' AND '20121203';
")