Hi,

Just to add...

Larry E. Ullman <[EMAIL PROTECTED]> wrote:

> >        I am doing a receipt system whereby it can auto generate a 
> > unique receipt
> > number for each receipt. It will be an increment of number
> > eg.000001, 000002,
> > 000003, and so on.....Wonder how should I go about doing this
> > using PHP? Do need
> > some help here..technologies used are:PHP and MySQL...
> 
> Since you're using MySQL, create a table for your receipts with a 
> receipt_number which is an auto_incremented, primary key, unsigned,
> not null, integer. When you add records to this, set this column's
> value to NULL or 0 and it will automatically use the next sequential
> number.

...and maybe "zerofill" will be useful here as well...

> See the MySQL manual for more.

(To the OP -> ) This is a good habit to acquire... ;)

- E -
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to