Re: MySQL Auto PK

From: Date: Wed, 05 Jan 2005 23:11:23 +0000
Subject: Re: MySQL Auto PK
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37986@lists.php.net to get a copy of this message
OOzy Pal wrote:
Is it possible to have mysql at an ID as 20050105-1 as (YYYYMMDD-1), -2, etc.
automatically? No. But you can always just use SELECT CONCAT(date_column,'-',pk_column) AS fixed_id ... if you _really_ need something like this. Or just join them together in PHP. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#37986) next »