Re: Re: Incremental Date Based ID
| From: | Gerry Danen | Date: | Wed, 08 Mar 2006 01:56:09 +0000 |
| Subject: | Re: Re: Incremental Date Based ID | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231639@lists.php.net to get a copy of this message | ||
Should have read the whole thread first, I guess... :)
Gerry
http://groups.yahoo.com/group/php_and_mysql/
On 3/7/06, Shaunak Kashyap <skashyap@worldpokertour.com> wrote:
> A possible solution:
>
> Make a composite primary key where the first field is the date and the
> second field would be of type enumeration (A..Z, in ascending order).
> Then use MAX(<second field>) WHERE <first field> = <today's date> to
> figure out the next primary key.
>
> Shaunak Kashyap