Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String getExistingFileEntry = "select * from test "
- + " where a = ? and b = ? and date < DATE_SUB(NOW(), INTERVAL 1 DAY)"
- + "order by id"
- + "limit 1";
- PreparedStatement pstVerify = null;
- pstVerify = con.prepareStatement(getExistingFileEntry);
- pstVerify.setString(1, a);
- pstVerify.setString(2, b);
- ResultSet rsFirst =null;
- String existingSum = null;
- //execute select SQL statement
- rsFirst = pstVerify.executeQuery();
- 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 '1' at line 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement