MySQL Forums
Forum List  »  PHP

Re: mysql_insert_id(); returnig 0 Record is added and the field is auto_increment?!!
Posted by: theodor michailow
Date: February 16, 2014 08:18AM

you mean


$sql="INSERT INTO service (locationstreet,locationkvartal,locationsity,streetnum)
VALUES
('$_POST[ulica]','$_POST[kvartal]','$_POST[grad]','$_POST[nomer]')";

$result = mysqli_query($sql,$con);
echo "ID of last inserted record is: " . mysqli_insert_id($con);

the result is the same... i get 0;

Options: ReplyQuote


Subject
Written By
Posted
Re: mysql_insert_id(); returnig 0 Record is added and the field is auto_increment?!!
February 16, 2014 08:18AM


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.