[thelist] best way to verify successful record insertion

Tom Dell'Aringa pixelmech at yahoo.com
Mon Aug 19 19:37:00 CDT 2002


--- "Chris W. Parker" <cparker at swatgear.com> wrote:
> yes. that is exactly what i'm talking about. the problem i was
> running
> into though was that of uniquely indentifying the registrant.
> that's why
> i had the idea of the session variable.
>
> a session varaible would uniquely identify the person more than
> there
> name could since two people can have the same name. (and that goes
> for
> almost any other field that i might need to record.) we deal with
> police
> and with the last event it happened a few times where a captain
> signed
> up his whole team changing only the name and rank of the registrant
> and
> leaving email, phone number, address, etc. the same.
>
> ok fine, it's not likely that two Steven Kurdings will sign up at
> exactly the same time. so then does that rule out the likelihood of
> retrieveing the wrong record based name? or maybe i should base it
> on a
> few fields? name, phone, address, rank?
>
> what would you suggest?
>
>
> chris.

I think session variables (someone correct me if I am wrong) tend to
be problematic. If your server reboots, I *think* you can get
duplicates. The best way is to build a unique "userID". I would do it
something like this:

Date + autoID from DB insertion in main table of register + hourmin

so you might end up with a number like:

081902 + 0012 + 161259 or 0819020012161259

You'd be hard pressed to get a duplicate on a number like that.
Frankly you may not even need that much (and its an icky number to
reference). Certainly your DB autonumber ID's of the main table would
be sufficient, I would guess. Didn't you have a table with everyone's
name that registered, and didn't that table have an unique ID?

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the thelist mailing list