Welcome Guest, Not a member yet? Register   Sign In
get the user_id while inserting a new record to a table
#1

[eluser]max123[/eluser]
I have a table called 'user'. Primary key is 'user_id' and it is an auto increment value. When I'm inserting a new user to the table, I want to get the user_id of that user. What is the sql query to do that

Thanx
#2

[eluser]n0xie[/eluser]
Code:
$this->db->insert_id()




Theme © iAndrew 2016 - Forum software by © MyBB