I have tabela_x
, where the first field ( campo1
) is primary key
and autoincrement
.
I make a simple INSERT
:
$ins = " INSERT INTO tabela_x ('campo2','campo3','campo4') VALUES ($c2, $c3, $c4) ";
$con -> query($ins)
I would like to get the return of this insert, with the value of campo1
.
I will always have to do a select
right after insert
just to get this value or is there any way I execute the query
of the insert,