[SOLVED] Returning row number from a row that was just in...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
plezops
Forum Newbie
Posts: 11
Joined: Mon May 28, 2007 5:22 pm
Location: Austin, Texas

[SOLVED] Returning row number from a row that was just in...

Post by plezops »

I am trying to return the information from a database after a user submits something. The information is validated and the info is inserted into a database, this all works fine but I would like to know which row the information was placed in so that I can use that info to display on the submit results page.

Thanks in advanced
Last edited by plezops on Mon May 28, 2007 6:08 pm, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

mysql_insert_id() will give you the id of the last inserted row.
plezops
Forum Newbie
Posts: 11
Joined: Mon May 28, 2007 5:22 pm
Location: Austin, Texas

Post by plezops »

Cool that works! Thanks.
Post Reply