MySQL do support composite keys . Have a look on the mysql database
structure the "columns_priv" table has 5 fields in its primary key.
I think you should use an auto_increment as your primary field instead.
HTH.
Jayme.
-----Mensagem Original-----
De: Russ Michell <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 19 de fevereiro de 2001 11:21
Assunto: [PHP-DB] composite keys
> Hi all:
> I am using php4.0.3pl1 with MySQL 3.22.32 on Apache for RH Linux.
>
> I have a table/relation of sports, where amongst other categories, are
> teams, where there can be many 'teamNames' & 'teamInfos' for one sport.
>
> The problem here is that without the use of a composite key:
> 'sportName' & 'TeamName', there can be no method of uniquely
> identifiying a row or tuple. A smuch of the info for each sport is
> repeated.
>
> Does MySQL support the use of composite keys? I am using phpMyAdmin
> 2.1.0 to adminster my MySQL system, and this only seems to accept a
> single primary key for a single table.
>
> Any advice or other methods I could possibley employ, are most welcome.
>
> Regards:
> Russ
>
> #-------------------------------------------------------#
>
> "Believe nothing - consider everything"
>
> Russ Michell
> Anglia Polytechnic University Webteam
> http://gertrude.sipu.anglia.ac.uk/webteam
> [EMAIL PROTECTED]
> +44 (0)1223 363271 ext 2331
>
> www.theruss.com
>
> #-------------------------------------------------------#
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]