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 '?' 问题的解决
问题描述
显示在条件查询的sql语句那里报错
问题解决
本来我是习惯了使用servlet写数据库操作的,然后就直接忽略掉了,或者说,直接忘记了在jsp里面的sql语句怎么正确书写了;
经过查阅资料发现,查询语句是这样写的:
String sql="select * from book where id="+id;