I'm running an INSERT
query from one php file, but then I need to get the last inserted id from an external php file so as to run another query based on that id. How can I pull this off using CURRVAL
or RETURNING
? From the external php file, if I do something like
$result = pg_query($db,"SELECT CURRVAL('app.example_id_seq'), ... ");
I get no results.