I\'m a newbie to SQL and I\'m jumping in head first trying to learn as much as possible as I\'m coding, which is difficult as I\'m designing the database I\'ll have to live
You should use the ID's of the two users as PRIMARY KEY in a relationship table (the relation would be unique even if not bi-directional). Something like that
CREATE TABLE
Users
(id
int(9) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id
) );CREATE TABLE
Relationships
(id1
int(9) NOT NULL,id2
int(9) NOT NULL,friended
TIMESTAMP NOT NULL, PRIMARY KEY (id1
,id2
) );
Please note: