ordering by count

2007-01-25 Thread Konstantin Saveljev
Hi, i have a system that has media files ==> users can be fans of media ( so media becomes their favorite ). the table itself: CREATE TABLE media_fans( id int(11) unsigned not null auto_increment, user_id int(11) unsigned not null, media_id int(11) unsigned not null, primary key(id),

search for connectivity

2006-12-01 Thread Konstantin Saveljev
Hi, I've been thinking a lot on the problem and finally decided to write about my problem to the list. Let's say we have a table: create table friends( id int(10) unsigned not null auto_increment, friend1 int(10) unsigned not null, friend2 int(10) unsigned not null, primary key(id), f