|
Posted by Jerry Stuckle on 10/07/88 11:56
monomaniac21 wrote:
> hi all
>
> On a networking site i am working on each user has their own id and the
> id of another person who they are linked to. what i want to do is to be
> able to pull up a list of everyone linked to one person and all the ppl
> linked to them. So the query would work something like get id of linked
> get linked row get id of linked to this person get of person get id of
> linked to person.... this needs to go on until it reaches one person
> who is not linked to anybody. can anyone tell me how to achieve that
> with a control loop?
>
> regards
>
> marc
>
I don't understand. If you're looping through links to other people,
you're *never* going to find anyone who's not linked.
You didn't say which database you're using - but I'd recommend you try a
newsgroup related to your database. You could, for instance, get
everyone linked to a particular person through X levels with one query
in DB2 - but it would be a heck of a query. You probably can do it in
Oracle and SQL Server, also. Don't know about others.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|