I\'m trying to use the prepareStatement function. The code is below. After it executes, it returns me a bunch of vlicense strings instead of the va
It has nothing to do with jdbc, prepared-statements or mysql.
It's just a wrong sql statement.
If you type:
Select 'justanexample' from Vehicle
and the table contains 4 lines, you will get 4 times
'justanexample'
'justanexample'
'justanexample'
'justanexample'
as result.
You did not specify your the table structure, but I guess the statement should somehow look like this:
select * from Vehicle where license = ?