mysql get the last id php

Solutions on MaxInterview for mysql get the last id php by the best coders in the world

showing results for - "mysql get the last id php"
Nico
01 Aug 2019
1// Insert query 
2$query = "insert into users(username,fname,lname) values('sonarika','Sonarika','Bhadoria')"; 
3
4mysqli_query($con,$query); 
5
6// Get last insert id 
7$lastid = mysqli_insert_id($con);