the first field, ID, is just for keeping a standard sequence and isn't
called from any web pages. The second ($docid) is a random field which is
called from a web page, which makes it harder (if not impossible) to
guess/hack. This makes it a bit more secure.

A note about the old docid #'s, my intention is to replace the old $docid
with one in the new format. And, since the random docid is based (partly) on
the time at which it was generated, there's not much chance of it being
duplicated.

----- Original Message -----
From: "richard merit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 2:30 PM
Subject: Re: [PHP] Help with mass import to MySQL using PHP


> No answer, but a question.  I noticed you're using, in
> effect, two id's for each entry, a id number and a doc
> id number.  The first is accomplished thru
> auto-increment.  Wouldn't it be easier to us just one
> id number, a=LAST_INSERT_ID(id+b) and reserve the
> first 10k numbers (b), whatever is needed for your old
> files then run a php code to format your old entries
> and increment those 1 - 100000....and forget about
> random numbers.  If I'm not mistaken, if you generate
> random numbers you'll have to check, to be on the safe
> side, to make sure the random number wasn't used for
> someother doc.
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to