`

Parameter index out of range (2 > number of parameters, which is 1).

阅读更多

Parameter index out of range (2 > number of parameters, which is 1).

错误是预插入语句少了两个问号导致的,原因可能是sql语句'号使用不当导致的

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 != ?" 
				+ "' and (POW(ADJUST_JINGDU-?,2)+POW(ADJUST_WEIDU-?,2)<1)"
				+" order by CREATE_TIME desc limit ?,?";

 

 

就会报上面的错误,"' and (POW 就这里的'导致的。

分享到:
评论

相关推荐

    MySQL 数据库 like 语句通配符模糊查询小结

    MySQL 报错:Parameter index out of range (1 > number of parameters, which is 0)——MySQL 数据库 like 语句通配符模糊查询小结 前言 今天在使用MySQL语句执行增删改查操作时,控制台报出了以下错误:Parameter...

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    Featuring comprehensive coverage on a range of topics and perspectives such as swarm intelligence, speech recognition, and electromagnetic problem solving, this publication is ideally designed for ...

    BobBuilder_app

    In this version I have done away with the b+tree and hash index in favor of my own MGIndex structure which for all intents and purposes is superior and the performance numbers speak for themselves....

    apktool documentation

    // pkgId of framework-res.apk determines number (which is 0x01) $ apktool if com.htc.resources.apk I: Framework installed to: 2.apk // pkgId of com.htc.resources is 0x02 $ apktool if ...

    2009 达内Unix学习笔记

    mkdir dir1/dir2 在dir1下建dir2 mkdir dir13 dir4 dir5 连建多个 mkdir ~/games 用户主目录下建(默认在当前目录下创建) mkdir -p dir6/dir7/dir8 强制创建dir8;若没有前面的目录,会自动创建dir6和dir7。 ...

    二级减速器课程设计说明书reducer design specification.doc

    2, the transmission ratio range of the expanded two-stage gear reducer ia=8 ~ 40, the transmission ratio range of v-belt transmission is ib=2~4, so the theoretical transmission ratio range is=16~160....

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    index (counted from the first index instead of the first list item). - FIX: In THistory.DeleteActions added validation of FActionIndex (FActionIndex could appear beyond the list boundaries). Thanks ...

    Artificial Neural Networks_New Research-Nova Science(2017).pdf

    In the first part of the chapter an analysis of the main parameters which influence the ANN implementation in the examined papers was carried out, then some applications of ANN in energy and buildings...

    i-vector的工具箱

    As expected there is no change in overall shape of the distribution, and only the dynamic range of the feature stream is modified. wcmvn Purpose Cepstral mean and variance normalization (CMVN) ...

    数位板压力测试

    B.1. Extensions Programming 60 B.2. Out of Bounds Tracking 61 OBT Programming 61 Information Category 61 Turning OBT On and Off 61 B.3. Function Keys 62 FKEYS Programming 62 Information Category 62 B....

    BURNINTEST--硬件检测工具

    number of Network Addresses specified in Preferences-&gt;Network will be the number of NICs tested. This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. ...

    WPTools.v6.29.1.Pro

    + There is an overloaded LoadFromString which expects a WideString as parameter (Delphi 6+) - The Setup named the Delphi 2009 files "Delphi 2005" due to a typo. (Delphi 2005 units are not included any...

    php.ini-development

    The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored,...

    微软内部资料-SQL性能优化2

    A stack is an area of memory in which program procedure or function call addresses and parameters are temporarily stored. In Process To run in the same address space. In-process servers are loaded ...

    servlet2.4doc

    Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. destroy() - Method in class javax.servlet.GenericServlet Called by the servlet container to ...

    occam一维反演

    parameter (iof1 = 13, iof2 = 15) c iof1 = unit number for the LOGFIL (passed to /result/iout) c iof2 = unit number for reading and writing ITER files c c calls: c occam, filerr, itrout, itrin, inputm...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    Previous revisions did not range-check the palette index number, and hard crashes could be produced if out-of-range values were supplied to this routine. Previous release 1.33b Release date: ...

    S7A驱动720版本

    logical name of the driver device, which is requested, must be entered . Example: "!switch:D11" delivers the state of the driver device with the name "D11". This function is also available via ...

    VclZip pro v3.10.1

    - By defining ZLIB121, VCLZip will use the latest version of ZLib which is included with the registered version. Some optimization improvements which should show some improvement in zipping and ...

    Sakemail

    retrieved and SendMessage is a boolean function (maybe someone has pressed the cancel btn).- Fixed a bug when the subject field is too large.9/2/981.5.1- Fixed a bug with a message within a message ...

Global site tag (gtag.js) - Google Analytics