Re: Social Network, linking members

2006-04-10 Thread Shawn Green
--- Philippe Poelvoorde <[EMAIL PROTECTED]> wrote: > 2006/4/8, Philippe Poelvoorde <[EMAIL PROTECTED]>: > > Hi, > > > > 2006/4/8, Dan Buettner <[EMAIL PROTECTED]>: > > > Seems like what you're looking for is a way to query your > database > > > more efficiently/quickly, and still find all links

Re: Social Network, linking members

2006-04-10 Thread Philippe Poelvoorde
2006/4/8, Philippe Poelvoorde <[EMAIL PROTECTED]>: > Hi, > > 2006/4/8, Dan Buettner <[EMAIL PROTECTED]>: > > Seems like what you're looking for is a way to query your database > > more efficiently/quickly, and still find all links in either > > direction. > > > > I think the use of a UNION statemen

RE: Social Network, linking members

2006-04-10 Thread Shawn Green
> Sent: 07 April 2006 15:11 > To: Martin Gallagher; mysql@lists.mysql.com > Subject: Re: Social Network, linking members > > Martin Gallagher wrote: > > >Hi, > > > >I'm trying to find the most efficient way of "linking" members to > one > >anot

Re: Social Network, linking members

2006-04-08 Thread Philippe Poelvoorde
Hi, 2006/4/8, Dan Buettner <[EMAIL PROTECTED]>: > Seems like what you're looking for is a way to query your database > more efficiently/quickly, and still find all links in either > direction. > > I think the use of a UNION statement should allow this. Basically > write your query twice, joining

RE: Social Network, linking members

2006-04-07 Thread Dan Buettner
Original Message----- From: 2wsxdr5 [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 15:11 To: Martin Gallagher; mysql@lists.mysql.com Subject: Re: Social Network, linking members Martin Gallagher wrote: Hi, I'm trying to find the most efficient way of "linking" members to one another

Re: Social Network, linking members

2006-04-07 Thread Matt Richards
mailto:[EMAIL PROTECTED] Sent: 07 April 2006 15:11 To: Martin Gallagher; mysql@lists.mysql.com Subject: Re: Social Network, linking members Martin Gallagher wrote: Hi, I'm trying to find the most efficient way of "linking" members to one another in a social networking applica

RE: Social Network, linking members

2006-04-07 Thread Martin Gallagher
! That's exactly the problem. I think I might just have to grin and bear what I already have :-( -Original Message- From: 2wsxdr5 [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 15:11 To: Martin Gallagher; mysql@lists.mysql.com Subject: Re: Social Network, linking members Martin Gallagher w

Re: Social Network, linking members

2006-04-07 Thread 2wsxdr5
Martin Gallagher wrote: Hi, I'm trying to find the most efficient way of "linking" members to one another in a social networking application. Currently I link them using 2 separate fields for the members: id1, id2. So, to find people in your network you would do: I'm not sure exactly what it

RE: Social Network, linking members

2006-04-07 Thread Martin Gallagher
.mysql.com Subject: Re: Social Network, linking members How about something like this Users table user_id user_name user_password user_whatever and then Relation table rel_id user_id friend_id and then selecting from relations table

Re: Social Network, linking members

2006-04-07 Thread Jad madi
How about something like this Users table user_id user_name user_password user_whatever and then Relation table rel_id user_id friend_id and then selecting from relations table On Fri, 2006-04-07 at 14:47 -0700, Martin Gallagher w

Social Network, linking members

2006-04-07 Thread Martin Gallagher
Hi, I'm trying to find the most efficient way of "linking" members to one another in a social networking application. Currently I link them using 2 separate fields for the members: id1, id2. So, to find people in your network you would do: WHERE id1=%ID OR id2=%ID This uses indexes inefficientl