Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    59
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Simple Question- Retrieve Last DB Insert ID

    Hello,

    I am working on a couple of scripts that insert data into a mysql database and then sends the user off to PayPal. I am setting them us so the product ID is the same as the database ID so it works well with my IPN system. What I have done in the past is to use a Insert query followed by a Select query to get the ID. This works but I know I have seen another way to do it that was a snap but I can't find it.

    If you know what I am talking about please post it. Thanks for the help!

  • #2
    Regular Coder
    Join Date
    Jun 2005
    Posts
    804
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You're probably thinking of mysql_insert_id().

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    59
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That's probably it. I'll give that a try.
    Thanks for the help and the amazingly quick reply!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •