So I have a table in my database with reservations. In Java I only want to show the reservations of today and beyond.
PreparedStatement statement = con.prepareStatement(
"SELECT reservatieID,klanten.voornaam,klanten.achternaam,kamerID,startDatum,eindDatum "
+ "FROM reservatie "
+ "INNER JOIN klanten ON reservatie.klantID = klanten.klantID"
+ "WHERE eindDatum =>?");
String now = basisLogin.getDate();
statement.setString(1, now);
ResultSet resultSet = statement.executeQuery();
So this is my code. The string of today's date is in this format: yyyy-MM-dd
This is the error I get:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have anerror in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'eindDatum >'2017-03-07'' at line 1
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
What am I doing wrong?