我在尝试准备和执行语句时遇到以下错误:
转换规范的字符值无效,SQLExecute中的SQL状态22005
我能做些什么来避免这个错误吗?
if (isset($_POST['end'])) {
foreach ($_POST['items'] as $checked) {
$sql = "UPDATE oeprcfil_sql SET end_dt=? WHERE cd_tp_1_cust_no =? AND cd_tp_1_item_no =? AND ID =?";
$prepare = odbc_prepare($conn, $sql);
$end_dt = $checked['end_dt'];
$cus_no = $checked['cus_no'];
$item_no = $checked['item_no'];
$id = $checked['ID'];
odbc_execute(
$prepare,
array($end_dt, $cus_no, $item_no, $id)
);
}
}