Re: MySQL Auto PK

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

 



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

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux