Package proposal: Unique
| From: | cagrET | Date: | Tue, 24 Jun 2003 14:59:56 +0000 |
| Subject: | Package proposal: Unique | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-17665@lists.php.net to get a copy of this message | ||
Hi,
wondering if such package could be usefull
Class provides methods to generate and hold unique ID's.
The aim is to avoid multiple same records in your database tables.
1. Generate unique ID
2. Include it in your html FORM as post input etc
3. Check if incoming ID is unique, If yes then add this ID to unique_id
table and add record
example of use here:
http://scg.milc.pl/cagret/Unique/example.php
class here:
http://scg.milc.pl/cagret/Unique/Unique.php
there is also automate garbage collection of unique ID's - u can set
maxlifetime
cheers,
--
cagrET