[UPHPU] Sequentially number records with php/mysql

Eric Goebel ericgoebel at gmail.com
Thu Nov 11 10:26:28 MST 2004


If you do that with your filenames, make sure you add seconds and an
order # to the file name.  You don't want two files created at the
same time to get the same name.  If you start getting alot of orders,
you'll be amazed at how often two orders are submitted in the same
second.

Example:  11112004_152434_ 123456.pdf for 11/11/2004 3:24:34 pm for
order #123456.


On Thu, 11 Nov 2004 09:35:01 -0700, Brent Wilkinson <brent at air2data.com> wrote:
> Nother way to do this maybe to create the file with the name of the file the
> date it was created like for right now 11/11/2004 9:30am the file could be
> 111120040930.pdf or the record number could be 111120040930 or something to
> that effect.
> 
> 
> 
> 
> Brent Wilkinson
> Tech Manager
> Air2Data
> (866)-779-8585
> (801)-510-7474
> 
> -----Original Message-----
> From: uphpu-bounces at uphpu.org [mailto:uphpu-bounces at uphpu.org] On Behalf Of
> Mac Newbold
> Sent: Wednesday, November 10, 2004 1:34 PM
> To: Ashley Oviatt
> Cc: PHP List
> Subject: Re: [UPHPU] Sequentially number records with php/mysql
> 
> Today at 11:33am, Ashley Oviatt said:
> 
> >Because I am creating a pdf of the business card and that's how I name
> >the file. If they don't like the proof pdf, they don't have to order.
> 
> Two ways to work around this:
> 
> 1) when they "cancel", delete the record and the file
> 2) after a while (days/weeks maybe), purge old records and files
> 
> An alternative:
> 
> Name the file with a random number, then if they actually order, make a
> permanent ID in the database, and associate the filename with it (or rename
> the file with the new ID).
> 
> Mac
> 
> --
> Mac Newbold             MNE - Mac Newbold Enterprises, LLC
> mac at macnewbold.com      http://www.macnewbold.com/
> 
> _______________________________________________
> 
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
> 
> Sponsored by hostinginferno.com!
> 
> _______________________________________________
> 
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
> 
> Sponsored by hostinginferno.com!
>



More information about the UPHPU mailing list