Results 1 to 2 of 2

Thread: a database question

  1. #1
    niha is offline U play the way U practice
    Join Date
    Oct 2006

    a database question

    Hi everyone.
    since i am not that good in DB. i would like to know something. here is the case i am having; a site where users get registered , obviosuly saving their data in the database mysql...here is the system:

    the user registration process is splitted into 2 parts every part when accomplished the data of this part of the process gets saved in the a temp table and when the user passed the whole 3 parts the data gets saved in a final table the only thing is for every user a dynamic number is assigned that should be unique for each client.

    My fear is when the user 1 register after getting the dynaimc random number another user at the same moment gets the same dynamic random number so user 1 gets registered while the other even if everything is ok can not get registered bec simply the number already exist, not only that ... it would be too late becuase this user data will be alreayd passed to a third system that i dont have any control on! ..... any ideas how can i avoid this.

  2. #2
    Join Date
    Feb 2003
    instead of random, use auto-increment.
    or make random based on some seed guranteed not to repeat, like current cpu time or auto-increment or perhaps client ip address

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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