--- PApp-SQL/SQL.pm 2005/09/01 08:57:52 1.33 +++ PApp-SQL/SQL.pm 2006/01/09 06:10:40 1.34 @@ -46,7 +46,7 @@ BEGIN { use base qw(Exporter DynaLoader); - $VERSION = '1.0'; + $VERSION = '1.01'; @EXPORT = qw( sql_exec sql_fetch sql_fetchall sql_exists sql_insertid $sql_exec sql_uexec sql_ufetch sql_ufetchall sql_uexists @@ -301,6 +301,7 @@ postgres: C column (is there a way to get the last SERIAL?) sybase: C column of the last insert (slow) informix: C or C column of the last insert + sqlite: C Except for sybase, this does not require a server access. @@ -315,6 +316,7 @@ $driver eq "Pg" and return $sth->{pg_oid_status}; $driver eq "Sybase" and return sql_fetch($dbh, 'SELECT @@IDENTITY'); $driver eq "Informix" and return $sth->{ix_sqlerrd}[1]; + $driver eq "SQLite" and return sql_fetch($dbh, 'SELECT last_insert_rowid ()'); die "sql_insertid does not spport the dbd driver '$driver', please see PApp::SQL::sql_insertid"; }