mysql语句输入错误
String sql = "SELECT id,name,password,age,sex,hobby"+
"FROM newbook WHERE name LIKE ? OR password LIKE ? OR sex LIKE ? OR age LIKE ?";
出现错误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
原因为hobby"这里少了一个空格,改为hobby " 之后正常。