If I insert a value into a table what is the best way to find the Primary Field Value..
+--------------+---------------------+------+-----+
| Field | Type | Null | Key |
+--------------+---------------------+------+-----+
| EXTRA_ID | smallint(6) | | PRI |
| DATE_ADDED | datetime | YES | |
| DATE_AMENDED | datetime | YES | |
| NAME | char(30) | | |
| URL | char(30) | | |
| DESCRIPTION | char(250) | | |
| ACTIVE | char(1) | | |
| ISLAND_ID | tinyint(3) unsigned | | |
| resort_id | smallint(6) | | |
| priority | tinyint(1) | | |
+--------------+---------------------+------+-----+
If I insert the value "123" in the name field then a new row is added to the table, with a value in the EXTRA_ID field..
what is best ways of finding the value of the EXTRA_ID field, at the moment I do
select extra_id from {table} where name="123";
but the issue I have got now is I have the names the same in different rows
any ideas ?
Graham