[Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager
.getConnection("jdbc:mysql://localhost/sqler?"
+ "user=root&password=198367");
Statement stmt = con.createStatement();
String s="select 姓名,性别 ,身份证号,出发时间年月日,出发时间时分秒,lvingbiao.出发地点 ,lvxingbiao.到达地点,航班号,机票价格"
+"from"+"planeuser,lvxingbiao"
+"where planeuser.出发时间=lvxingbiao.出发时间年月日and planeuser.出发地点=xingbiao.出发地点 and planeuser.到达地点=lvxingbiao.到达地点" ;
ResultSet rs=stmttt.executeQuery(s);
总是报错: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 '.??·??±??=lvxingbiao.??·??±???ê????and planeuser.??·?????=xingbiao.??·????? and ' at line 1
Connection con = DriverManager
.getConnection("jdbc:mysql://localhost/sqler?"
+ "user=root&password=198367");
Statement stmt = con.createStatement();
String s="select 姓名,性别 ,身份证号,出发时间年月日,出发时间时分秒,lvingbiao.出发地点 ,lvxingbiao.到达地点,航班号,机票价格"
+"from"+"planeuser,lvxingbiao"
+"where planeuser.出发时间=lvxingbiao.出发时间年月日and planeuser.出发地点=xingbiao.出发地点 and planeuser.到达地点=lvxingbiao.到达地点" ;
ResultSet rs=stmttt.executeQuery(s);
总是报错: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 '.??·??±??=lvxingbiao.??·??±???ê????and planeuser.??·?????=xingbiao.??·????? and ' at line 1
解决方案 »
- nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingExcepti
- 循环更新数据库怎么写
- 请问大家PreparedStatement能执行多条sql语句吗?
- struts-config.xml报这种错误,如何解决
- myeclipse6.5自带tomcat的端口号怎么改...
- 有没有做过webservice的啊?能否给我个结合WEBLOGIC开发webservice的例子?
- 请问jsp和mysql数据库传递参数的问题。
- jsp与applet交互问题?
- 有关tomcat的问题,请指教!
- 寻求jsp高手
- 在线人数统计问题
- jsp下载异常socket write error,并且不能用使用迅雷下载。这个问题困扰我很久了,恳请高人救我,解决后一定敬献60分。在线狂等中...
链接查询语句可能有问题,或者把你的数据库的字符集设成UTF-8可能会解决中文无法识别的问题