mysql_insert_id question
#1

I have a question of mysql_insert_id.
does Mysql_insert_id returns to the auto increment value?

Let says I'm using the Unique ID of each row in my Mysql Table. I'm using the Auto Increment
so for example there are 4 rows in my table then there should be
----
1 = ID
2 = ID
3 = ID
4 = ID
----

and then I deleted the ID 2 so the out come will be
----
1 = ID
3 = ID
4 = ID
----
after that I insert a row so the outcome will be

----
1 = ID > row id = 1
3 = ID > row id = 2
4 = ID > row id = 3
5 = ID > row id = 4 // New Inserted
----

and I will use mysql_inser_id. Does the mysql_insert_id will return to the autoincrement value? the 5 ID or it will return in row id ?

I'm quite confused. I hope someone will understand what I'm trying to say lol.
Thanks In Advance.
Reply
#2

It will return 5.
Reply
#3

Quote:
Originally Posted by raydx
Посмотреть сообщение
It will return 5.
Really? It will return to it's AutoIncrement Value not the Row ID?
Reply
#4

Reply
#5

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Wow Thank you. I wonder where did you get the description I keep on searching via ****** and no luck.
And Thanks for the one who answered my question earlier! God bless.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)