jgil2584
05-11-03, 15:08
| Hey all, Im new to Perl and mysql but I have a problem. I am creating an online form used to collect information from a user. All the data from the fourm is collected and perl populates the data just fine, no problems. However, I want to give the user an account number which is an auto increment value in my database. The column name is acct_id. I am trying to find out what the last auto incremet value is using LAST_INSERT_ID() but i do not know how to assign that value to variable in my perl script. I am using dbi. For example, $dbh->do("SET '$acctnum'=(LAST_INSERT_ID())"); or $dbh->do("'$acctnum'=(LAST_INSERT_ID())"); or $dbh->do("$acctnum=(LAST_INSERT_ID())"); or How do I get the value of Last_Insert_ID into a variable in perl? I have several books and i dont see a deffinate answer. Thanks in advance! John |