I am currently figuring out which tables have what in them for an application I'm writing as an excercise, and I have a bunch of tables that look like this:
My question is this: If I'm declaring the primary key to be (userid, groupid), does that automatically mean that both my userid column and my groupid column will be indexed? If not, what should I add to the columns to have them indexed? I searched through the Mysql manual, but I must have missed it. Thanks for your timePHP Code:$query = 'create table assignedgroups (
userid int unsigned not null,
groupid int unsigned not null,
primary key (userid, groupid)
)';
$result = mysql_query( $query );
-ToshiroOC







Bookmarks