Posts by Noleto Júnior • 1 point
1 post
-
0
votes2
answers1175
viewsA: Get Insert ID after pg_query()
I was able to get the last id by adding at the end of Insert (RETURNING id) and then I used this command $ultimoID = pg_fetch_array($result,0)[0]; Full example: $sqlInsert = "Insert into tabela…