数据库一直报一个语法错误

     今天在用myecplise做一个向数据库写入数据的功能,但是报了一个mysql的语法错误,很快也根据提示解决了该问题,但是后来重新发布运行还是一直报那个错误,甚至我把那条语句注解了还是报。所以我大胆的推测应该是IDE出错了。

    重启myecplise 重新发布,果然没事了。

阅读更多

mybatis一直语法错误

12-31

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: rn### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0','25'' at line 4rn### The error may exist in file [D:\tomcat7\webapps\ROOT\WEB-INF\classes\sql-mapper\puterMapper.xml]rn### The error may involve com.puter.dao.puterDAO.findPuter-Inlinern### The error occurred while setting parametersrn### SQL: select * from tbl_puter limit ?,?rn### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0','25'' at line 4rn; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0','25'' at line 4rn org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:894)rn org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:617)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rnrn rn select * from tbl_puter limit #s,#limitrn rnrn把sql单独拿到终端是能正确执行的呢。

没有更多推荐了,返回首页