Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001062

RE: [PHP-DB] Design conundrum... From: Kristian Duske (ml.duske <email protected>)
Date: 06/23/01

> 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>