say I run the following insert:
insert into TableName (col1, col2) values (val1, val2);
this is on a table with an AUTO_INCREMENT id field. I want to know the value of ID after I run the insert.
[ol][li]Am I correct in assuming that the only way to do this is to select the row from TableName that has the largest value for id?[/li]
[li]is that method completely reliable?[/li]
[/ol] Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."
insert into TableName (col1, col2) values (val1, val2);
this is on a table with an AUTO_INCREMENT id field. I want to know the value of ID after I run the insert.
[ol][li]Am I correct in assuming that the only way to do this is to select the row from TableName that has the largest value for id?[/li]
[li]is that method completely reliable?[/li]
[/ol] Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."