MySQL Forums
Forum List  »  PHP

Re: Having trouble with mysqli_insert_id mysql stored procedure in php
Posted by: Peter Brawley
Date: February 10, 2017 12:41PM

Read again, the example you're using assumes myproc's first param in IN, the second is OUT, but in your myproc, the first param is OUT, the second is IN.

And what's the point of the sproc? Why not just ...

$conn = mysqli_connect( ... ) or exit( mysqli_connect_error() );
$res = mysqli_insert( $conn, ... ) or exit( mysqli_error($conn) );
$id = mysqli_insert_id( $conn );

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.