extract 这里是mysql的函数,用作提取时间的部分为什么楼主要这样写呢?select * from yuanluo.item where started='2007-05-09'这样写试试呢?
select * from yuanluo.item where extract(year from started)='2007' and extract(month from started)='05' and extract(day from started)='09' --------- 想问一下你这句在数据库中报错么?
$query = "select * from yuanluo.item where date_format(started,GET_FORMAT(DATE,'JIS')) ='".$startyear."-".$startmonth."-".$startday."'";
select * from yuanluo.item where extract(year from started)='2007' and extract(month from started)='05' and extract(day from started)='09'
---------
想问一下你这句在数据库中报错么?