圖片說明](https://www.aspphp.online/bianchen/UploadFiles_4619/201701/2017010612491535.jpg)
報錯提示:
com.mysql.jdbc.exceptions.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 '? and t.colpas=?' at line 1
插入一條記錄可以實現,就是取數出現了問題
把 ResultSet rs = ps.executeQuery(sql); 改為 ResultSet rs = ps.executeQuery();