3
I have the 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 Internet, with the value of the campo1.
I’ll always have to make one select shortly after the insert just to take that amount or have some way I perform the query of the Insert, taking as return the value ?
That’s right professor ! In my case it is
$con -> insert_id(http://php.net/manual/en/mysqli.insert-id.php). ;]– rbz