[UPHPU] Dual ID numbers

Ray Hunter bigdog at venticon.com
Tue Jun 7 10:37:42 MDT 2005


TJ Hunter wrote:
> As far as I know, MySQL doesn't support what you're trying to do.
> Here's what I would do though, let MySQL auto increment your primary
> key as normal and use that key for relationships, then create another
> field for your special id. you'll have to write your own php code to
> figure out what the next id is going to be instead of relying on the
> user to type it in or MySQL generating it for you.

you might want to have 3 tables:

1. composer table (auto-incremented composer_id)
2. cd relation table (cd_id)
3. composer_cd join table (incremented cd_id with composer_id)

-
ray



More information about the UPHPU mailing list