還可能是 :Parameter index out of range (2 > number of parameters, which is 1). 錯(cuò)誤是預(yù)插入語(yǔ)句少了兩個(gè)問(wèn)號(hào)導(dǎo)致的,原因可能是sql語(yǔ)句'號(hào)使用不當(dāng)導(dǎo)致的 String sql = "select * from t_mobile_picture where PIC_STATUS = '1" + "' and IMEI_ID != ?" + " and (POW(ADJUST_JINGDU-?,2)+POW(ADJUST_WEIDU-?,2)<1)" +" order by CREATE_TIME desc limit ?,?"; ? 如果不小心寫成 String sql = "select * from t_mobile_picture where PIC_STATUS = '1" + "' and IMEI_ID != ?" + &qu ...
2017-05-21
應(yīng)該是調(diào)用越界問(wèn)題吧:
"參數(shù)索引越界"(參數(shù)不能少于1個(gè))
一般是 ? sql語(yǔ)句少了問(wèn)號(hào)
是sql語(yǔ)句有問(wèn)題
還可能是 :Parameter index out of range (2 > number of parameters, which is 1). 錯(cuò)誤是預(yù)插入語(yǔ)句少了兩個(gè)問(wèn)號(hào)導(dǎo)致的,原因可能是sql語(yǔ)句'號(hào)使用不當(dāng)導(dǎo)致的 String sql = "select * from t_mobile_picture where PIC_STATUS = '1" + "' and IMEI_ID != ?" + " and (POW(ADJUST_JINGDU-?,2)+POW(ADJUST_WEIDU-?,2)<1)" +" order by CREATE_TIME desc limit ?,?"; ? 如果不小心寫成 String sql = "select * from t_mobile_picture where PIC_STATUS = '1" + "' and IMEI_ID != ?" + &qu ...
2021-06-18
我去? 我的原因是給占位符加了'?'? 導(dǎo)致我找了好久
2017-09-24
難受,忙了半個(gè)鐘 才發(fā)現(xiàn)是提交查詢的語(yǔ)句在賦值語(yǔ)句的前面