Do you know where your variables are? | |
PerlMonks |
Re: Binding values to table with autoincrement IDby McA (Priest) |
on Aug 27, 2014 at 17:05 UTC ( [id://1098781]=note: print w/replies, xml ) | Need Help?? |
Hi, you have to specify what columns of the table you want to insert values into. So you have to do something like:
where colX are the names of the columns to insert into. I assumed that the first column is the autoincrement column. You have to take the real column names. Without specifying the column names I would guess that the driver is going from left to right in the column definition of the table trying to bind the first variable to the autoincrement column. My advice: Do always specify the column names. It's more robust against some kind of table layout changes. McA
In Section
Seekers of Perl Wisdom
|
|