Results 1 to 10 of 40

Thread: Probelm with MySQL register.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Create a UNIQUE key constraint in your mysql db. Then use a stored procedure (function) to create new accounts, which use a INSERT IGNORE. Then double-check on last_insert_id inside that function. Return something if successful (possibly the user's ID), and an error code if unsuccessful (-1 should do a decent job at being an error code)
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    nightbot (23rd July 2016)

Posting Permissions

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