narjis Posted May 11, 2011 Share Posted May 11, 2011 I am making an ecommerce website for that I want to generate special keys for jobId unique for each client.Shall I use curl class for that and where should I initialize it. Quote Link to comment Share on other sites More sharing options...
xyph Posted May 11, 2011 Share Posted May 11, 2011 Do these ids need to be obfuscated or hard to guess? Why not let a database engine take care of the unique ID generation for you? Are you using a flat file to store these client tables? Quote Link to comment Share on other sites More sharing options...
narjis Posted May 12, 2011 Author Share Posted May 12, 2011 Can the database generate unique id's and then i can show that job id to the client Quote Link to comment Share on other sites More sharing options...
samato Posted May 12, 2011 Share Posted May 12, 2011 Yup. If you set your primary key as an INT (integer) and select "Auto Increment," every time you enter a new record into the database, it will have a unique ID number. Now, like xyph said, if they need to be complicated and hard to guess, then dont use this method, but if not, this will start at 1 and increase by 1 for every new record you add to the table. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.