last_row_id is not a function. It is a predefined value.
Gilles wrote:
> On Sat, 9 Feb 2008 08:41:56 -0500, "Igor Tandetnik"
> <[EMAIL PROTECTED]> wrote:
>> INSERT INTO phones (tel,id_customers) VALUES ('1234567',last_row_id());
>
> Thanks, but I'm getting an error (FWIW, I'm using 3.5.4):
>
> ========
> sqlite> BEGIN;INSERT INTO customers (id,name) VALUES (NULL,'John
> Doe');INSERT INTO phones (tel,id_customers) VALUES
> ('1234567',last_row_id());COMMIT;
> SQL error: no such function: last_row_id
> ========
>
> Besides, I need to get the last ROW_ID of table "customers", not the
> one from table "phones".
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users