in reply to Re: Inserting values into a MySQL database
in thread Inserting values into a MySQL database

Chmrr is correct. In order for SQL to know what columns your are inserting into, you have to name them.  INSERT INTO Table VALUES (?,?) isn't sufficient. You need to specify the fields, via   INSERT INTO Table (a, b) VALUES (?,?) Think of it as a list of associations, but with an array of keys on the left, and an array of values (or placeholders) on the right.


Update: According the the MySQL doc for INSERT, the column names are indeed optional. This is a bad practice, however, since it will break your code whenever you change a table. My recommendation is to always explicitly name columns.