Re: Re: Incremental Date Based ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx> 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

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux