php-db | 2001062
Date: 06/23/01
- Next message: Matthew Cothier: "[PHP-DB] Subtracting times?"
- Previous message: Brett Shaw: "[PHP-DB] PhpDEV"
- In reply to: Antonio Mármol Albert: "Re: [PHP-DB] Design conundrum..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> With index in the third table, How would it be ?
>
> PRIMARY KEY (editor, category)
>
> or
>
> KEY (editor),
> KEY (category)
>
> What's the better (more efficient and correct) ??
I don't really know - I personally use a third id field as a primary key,
but if you want to use REPLACE to update / insert your records, you have to
use the PRIMARY KEY (editor, category) version - your the fields you mention
in your REPLACE statement must form a unique key.
Kristian
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Matthew Cothier: "[PHP-DB] Subtracting times?"
- Previous message: Brett Shaw: "[PHP-DB] PhpDEV"
- In reply to: Antonio Mármol Albert: "Re: [PHP-DB] Design conundrum..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

