Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to get back the value of an auto_increment field

Quote Reply
How to get back the value of an auto_increment field
I added a global which inserts some data in a new table Transaktion

Code:
sub {
my $tags = shift;
my $db = $DB->table ('Transaktion');
my $sth = $db->insert ( {
TR_CustomerNo => $tags->{Kundennummer},
TR_CustomerRef => $tags->{BestNo},
TR_LinkID => $tags->{ID},
TR_Preis => $tags->{Preis} });
return "transaktion_insert: $sth ";
}
Now I want, that I get back the auto_incremet field in my table called TRNR. I thought like something with
Code:

$db->select ( LAST_INSERT_ID() );
but GLinks does not support that.
Thanks a lot for your help,
Christian

Subject Author Views Date
Thread How to get back the value of an auto_increment field cwschroeder 3652 Jan 13, 2008, 5:59 AM
Thread Re: [cwschroeder] How to get back the value of an auto_increment field
Andy 3564 Jan 13, 2008, 6:34 AM
Post Re: [Andy] How to get back the value of an auto_increment field
cwschroeder 3571 Jan 13, 2008, 9:09 AM
Thread Re: [cwschroeder] How to get back the value of an auto_increment field
brewt 3573 Jan 13, 2008, 10:06 AM
Post Re: [brewt] How to get back the value of an auto_increment field
cwschroeder 3544 Jan 13, 2008, 1:44 PM