我的数据库中有一些日期是这样的: FCOL_DATE = 31/08/2007 00:00
我正在尝试进行此查询,但收到此错误: 解析错误:语法错误,
中意外的'%'$from1 = "01/08/2013";
$to1 = "31/08/2013";
foreach ($query=$db->query("SELECT
t1.FCOL_ID, t1.FCOL_FRN_ID, t1.FCOL_DATE, t1.FCOL_PERIODE,
t2.STK_IDFACTCOLISAGE
FROM colisage t1
INNER JOIN mvt_stock t2
ON t1.FCOL_ID = t2.STK_IDFACTCOLISAGE
WHERE STR_TO_DATE(FCOL_DATE, "%d/%m/%Y") BETWEEN $from1 AND $to1 AND t1.FCOL_FRN_ID = $frnId") AS $donnees):