frankivey Posted August 18, 2006 Share Posted August 18, 2006 I am building a custom datagrid for a simple customer tracking system and would like to know how do I return the id (which is auto-incremented) for each row so that I may use it to reference the fields (customername, email, payment amount) from each row?the table structure is as follows (id auto increment, customername, email, payment_amount)how do I return the [id] for each row in order to reference other fields in the row? Link to comment https://forums.phpfreaks.com/topic/17906-how-do-i-return-the-auto-incremented-id-for-each-row/ Share on other sites More sharing options...
manmadareddy Posted August 18, 2006 Share Posted August 18, 2006 Use mysql_insert_id() function to get the id of latest inserted record. Link to comment https://forums.phpfreaks.com/topic/17906-how-do-i-return-the-auto-incremented-id-for-each-row/#findComment-76579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.