in reply to last_insert_id() in sybase
Hello Shreyak,
As everybody suggested, I think there might be a really small syntax mistake at your code. Provide us with a short script to take a closer look.
By the way I found this piece of code:
$dbh->do('INSERT INTO a_table ...'); my $id = $dbh->last_insert_id(undef, undef, qw(a_table a_table_id)) or die "no insert id?";
Taken from MySQL Perl DBI last_insert_id. Take a look, maybe you will see a difference on your syntax.
Update:Forgot to mention that also SELECT LAST_INSERT_ID() the MySQL query will also do the job. You can read more about it here LAST_INSERT_ID(), LAST_INSERT_ID(expr).
Hope this helps.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: last_insert_id() in sybase
by Shreyak (Novice) on Jul 12, 2014 at 04:47 UTC | |
by boftx (Deacon) on Jul 12, 2014 at 05:24 UTC | |
by Shreyak (Novice) on Jul 12, 2014 at 07:01 UTC | |
by boftx (Deacon) on Jul 12, 2014 at 07:07 UTC | |
Re^2: last_insert_id() in sybase
by Shreyak (Novice) on Jul 12, 2014 at 05:24 UTC | |
by Shreyak (Novice) on Jul 12, 2014 at 07:45 UTC | |
by poj (Abbot) on Jul 12, 2014 at 08:44 UTC |