Re: Help with mass import to MySQL using PHP

From: Date: Sat, 24 Feb 2001 20:21:06 +0000
Subject: Re: Help with mass import to MySQL using PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41508@lists.php.net to get a copy of this message
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" <richand2002@yahoo.com> To: <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#41508) next »