Welcome Guest, Not a member yet? Register   Sign In
MySQL Insert ID?
#1

[eluser]Tim Stackhouse[/eluser]
I'm such a newb... Anyway, I've poured over the User Guide and the Wiki and I can't figure out how to get the last inserted id. Here's the scenario:

I have 2 classes and corresponding tables: User and Person. User has a foreign key constraint that references person, which may or may not already have a record for a person trying to register. I've got this part taken care of. However When it comes time to save their info, I'll need to know the id of the person object I created if one didn't already exist, so what do I call to get that?


Messages In This Thread
MySQL Insert ID? - by El Forum - 04-14-2009, 12:00 PM
MySQL Insert ID? - by El Forum - 04-14-2009, 12:12 PM
MySQL Insert ID? - by El Forum - 04-14-2009, 12:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB