Your INSERT
statement is incorrect. You should either include names of columns other then id
INSERT INTO vehicles (vehicle_ref_no, vehicle_plate_no) VALUES (?, ?);
or pass NULL for id
INSERT INTO vehicles (id, vehicle_ref_no, vehicle_plate_no) VALUES (NULL, ?, ?);
or just
INSERT INTO vehicles VALUES (NULL, ?, ?);
Here is SQLFiddle demo