Jump to content

MYSQL questions


Eggzorcist

Recommended Posts

Hi there,

 

I have a question concerning MYSQL.

 

I have a friend list with 3 fields, id, friend1, friend2. This highlights all the members friend relations among each other.

 

My problem in making a friendlist is that it's difficult making a friendlist query. I'm wondering if I can select friend1 when friend2 = $username and select friend 2 when $friend1 = $username for each row. Was wondering if this is possible?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/264712-mysql-questions/
Share on other sites

The way I would go about doing this myself would be do a friend1 = username, friend2 = username then loop through the friend1 data with logic parameters singling them out. I was just wondering whether this is an efficient method to do this? What's another way?

Link to comment
https://forums.phpfreaks.com/topic/264712-mysql-questions/#findComment-1356731
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.