close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

membership number creation

Thread began 11/19/2014 9:48 am by s.joiner74419001 | Last modified 12/01/2014 11:31 am by Jason Byrnes | 203 views | 3 replies |

s.joiner74419001

membership number creation

Hi Jason,

I have a membership form and I am wanting a unique number created automatically for each record which will be the users membership number. I am testing this with 'security assists' 'random password' with a numbers only 6 digit format. Can you tell me if these numbers will always be unique? Subsequently is this a good way of automatically creating a membership number for the user or is there better way of doing this?

Thanks in advance!

Sign in to reply to this post

Jason ByrnesWebAssist

using a random number generator, there is a possibility that it could generate the same number twice, although it is a slim possibility. To prevent this from happening, you could set the member number in the database to not allow duplicates, you could also use Server Validation Unique Database Value on that column, that will look up the random number to ensure it has not been used and fail validation on the off chance it already exists.

using the random number generator will be fine, just use the Unique DB value also.

another option would be to use the Primary ID Auto Increment column for the member number, the downfall there, is that each one will increment by 1, but it will always be unique.

Sign in to reply to this post

s.joiner74419001

With regard to the using the primary ID. I suppose I could for example start the AUTO_INCREMENT at, for example, 100000 if I wanted a 6 digit number. the increment by 1 is not ideal but would work, until 999999 that is!

If I use the random number generator with Server Validation Unique Database Value. What will happen if the Validation fails? Will it automatically create another number?

Thanks in Advance Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

YEs, you can start the auto increment at 100000

  the increment by 1 is not ideal but would work, until 999999 that is!  



if you are going to use a 6 digit number, you are limited to 100000 - 999999 whether you auto increment or randomly generate.

Using the unique database validation, the registration would fail, you could set it to show a message to retry the registration which would generate a new number.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...