Re: Package proposal: Unique
| From: | Martin Jansen | Date: | Tue, 24 Jun 2003 17:16:30 +0000 |
| Subject: | Re: Package proposal: Unique | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17676@lists.php.net to get a copy of this message | ||
On Tue Jun 24, 2003 at 04:5956PM +0200, cagrET wrote:
> 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
It would certainly be more useful if it provided different storage
interfaces (SQL, text files etc.). To see how that's done, have a look
at the Container system that is being used by Auth or Config.
What do you think about that?
--
- Martin Martin Jansen
http://martinjansen.com/