我正在尝试运行以下查询。但它给出了以下错误。如果有其他方法可以,请告诉我。
$resource_query = AgentsCdr::create()
->withColumn('(UNIX_TIMESTAMP(AgentsCdr.PickupTime)-UNIX_TIMESTAMP(AgentsCdr.Calldate))', 'waittime')
->withColumn('(UNIX_TIMESTAMP(AgentsCdr.LastHangup)-UNIX_TIMESTAMP(AgentsCdr.Calldate))', 'waittime2')
->filterByCalldate("$sdate $stime",Criteria::GREATER_EQUAL)
->filterByCalldate("$edate $etime",Criteria::LESS_EQUAL)
//here is the issue occurs. Because of 2017-08-09%
->filterByCalldate("2017-08-09%",Criteria::NOT_LIKE);
返回错误为[message:protected] => Error parsing date/time value: '2017-08-09%'
你能为我建议一个解决方案。谢谢。