This is a discussion on "[solved] Help with using mysql_insert_id" within the PHP Forum section. This forum, and the thread "[solved] Help with using mysql_insert_id are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[solved] Help with using mysql_insert_id
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi all
I'm building a web application for a client, and I'm a little stuck on using the "mysql_insert_id" function. Basically, once a member registers, their profile information is inserted into the central database, which is not a problem - done this hundreds of times before. The problem is that the client wants the members to be emailed their account login information, as soon as registration is complete. I'm using Dreamweaver 8, so how would I go about getting the unique id of the last inserted ID so that I can create a recordset, based on this? Hope I've made myself clear enough, please feel free to email me for further clarification! Many thanks John Alexander Hopper Last edited by Jack Franklin; Mar 8th, 2008 at 20:46. Reason: Removed email from post. |
|
|
|
#2
|
||||
|
||||
|
Re: Help with using mysql_insert_id
I've had the exact same problem. You can either set the id to auto_increment, (The easiest way) or you can use a query like this:
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
|
|
#3
|
|||
|
|||
|
Re: Help with using mysql_insert_id
Hi
Thankyou very much for that - it's sorted my problem! John |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] 1 solved problem causes another | delusion | Web Page Design | 9 | Dec 21st, 2007 08:12 |
| Adding "Topic Solved" for solved topics | AdRock | Webforumz Suggestions and Feedback | 21 | Oct 4th, 2007 15:08 |