我知道有關於這個錯誤的幾個問題,也爲PHP。
我已經嘗試了大部分的答案,似乎沒有任何工作。PL/SQL查詢沒有結果,但應該有。
這是我的查詢:
"select
id,
employeenr,
name,
section,
description,
duration,
to_date(substr(startdate,0,12)||' '||starttime, 'DD-MM-YYYY HH24:MI:SS') starttime,
to_date(substr(enddate,0,12)||' '||endtime, 'DD-MM-YYYY HH24:MI:SS') endtime,
worktime,
statement,
remark
from
data
where 1=1
".$vw."
AND startdate between to_date(':df 00:00:00', 'DD-MM-YYYY HH24:MI:SS') and to_date(':dt 23:59:59', 'DD-MM-YYYY HH24:MI:SS')
".$vw1."
order by nvl(employeenr,0), startdate";
$parameters = array(':df' => $date_from, ':dt' => $date_to);
回聲VAR VW:
AND (employeenr between '100000' and '199999'OR employeenr between '400000' and '499999'OR employeenr between '700000' and '799999'OR (employeenr is not null AND employeenr between '100000' and '199999'OR employeenr between '400000' and '499999'OR employeenr between '700000' and '799999'))
$ date_from和$ DATE_TO:
$date_from = $_POST["date_from"]; // jQuery datepicker value
$date_to = $_POST["date_to"]; // jQuery datepicker value
我在做什麼錯?
employeenr'100000'和'199999'之間 - 在OR和'199999'之間留出空格 –
The?代表參數。如果你看看查詢,在底部你會看到$ parameters = array($ date_from); 下面,我發佈了該變量的回聲。 – McBurgerKong
@AbdullaChozhimadathil那可悲的是 – McBurgerKong