Page 1 of 1

Showing downline

Posted: Sat Oct 14, 2006 7:50 am
by arukomp
Hi again everyone. Now I'm here with another question (problem maybe) :)

My script has to show member's downline (his referrals). But i came up with a problem - how can i do it.

I store all members data in Mysql database. Every member has "refid" field, which is their sponsor. I want to show one members downline. To show every member, where refid is 2, 15 or other member's id.

Can you help me? I can't think out anything. I thought to write everything in array, but i don't know how to extract all members all by one.

Thanks

Posted: Sat Oct 14, 2006 7:53 am
by feyd
I'm not sure how your database works, let alone the logic you're trying to accomplish.

Moved to Databases.

Posted: Sat Nov 11, 2006 8:12 pm
by califdon
I think you probably are asking how to write a simple SQL query. Please don't take offense, but when I see a question phrased as yours is, I wince, because it appears that you are trying to program for a database without a clue as to how databases work or how to use SQL language. That's certainly no crime, but it suggests that before you can use any advice that we might give, you need to spend many hours studying the basics. If you don't do that first, you will never figure out how to do what you want to do.