sql语句是这样的:
$kstime=$_POST["kstime"];
$jstime=$_POST["jstime"];Select * From tab where createdtime >='".$kstime."' and createdtime <='".$jstime."'搜索出来的结果为什么不包括当天的呢?当createdtime >='2012-6-7' and createdtime <='2012-6-10'的时候,7号和10号的内容显示不出来,请各位帮忙!
$kstime=$_POST["kstime"];
$jstime=$_POST["jstime"];Select * From tab where createdtime >='".$kstime."' and createdtime <='".$jstime."'搜索出来的结果为什么不包括当天的呢?当createdtime >='2012-6-7' and createdtime <='2012-6-10'的时候,7号和10号的内容显示不出来,请各位帮忙!
#结果包含边界值
$sql = "SELECT * FROM tab WHERE createdtime BETWEEN '".$kstime."' AND '".$jstime."';"
放到数据库里执行了一下,怎么还搜索不到呢?