I added a global which inserts some data in a new table Transaktion
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
$db->select ( LAST_INSERT_ID() );but GLinks does not support that.
Thanks a lot for your help,
Christian
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 ";
}
Code:
$db->select ( LAST_INSERT_ID() );
Thanks a lot for your help,
Christian