Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
turbo2ltr
- Forum Commoner
- Posts: 29
- Joined: Sun Jul 18, 2004 4:08 pm
Post
by turbo2ltr »
Is there any way to get the auto_increment'ed ID back from an INSERT?
Assume that the ID may be the only unique field between records so running a SELECT on the inserted data may not return the newly inserted record.
Thanks,
Mike
-
hawleyjr
- BeerMod
- Posts: 2170
- Joined: Tue Jan 13, 2004 4:58 pm
- Location: Jax FL & Spokane WA USA
Post
by hawleyjr »
[php_man]mysql_insert_id [/php_man]
-
turbo2ltr
- Forum Commoner
- Posts: 29
- Joined: Sun Jul 18, 2004 4:08 pm
Post
by turbo2ltr »
Thanks!