I’m having error trying to access mysql data, using multiple WHERE clause in preparedstatement. This is the code that generate sql exception( parameter index out of range ( 2 > number of parameters, which is 1 );
"SELECT Arrived_time, Closed_time FROM ?
WHERE (\"Year = ?\n) AND (\"Month = ?\n) AND (\"Day = ?)"
and I entered the three paremeters. Is there a better way?
As mentioned, you need to specify your table name and use correct quoting: