- Impact
- 26
I am working on a site and I need some info. I have a "Friends" Module (picture myspace) and I need to to only pull members of a certain group ID. I think this is where pulls th list of members to add....
$sqlstr ="SELECT uid, uname, level FROM ".$db->prefix("users")." WHERE level>0 AND uid!=$myid LIMIT $inf, $tranche";
But I need to to pull from 2 tables so it will also get the groupid . I have written the sql statement to pull from where I need to but cant figure out how to write it into php . here is the sql statement
SELECT pop_users.uid, pop_users.uname, pop_groups_users_link.groupid
FROM pop_users, pop_groups_users_link
WHERE pop_users.uid = pop_groups_users_link.uid
AND groupid =4
This pulls the info I need.
Any help would be great.
$sqlstr ="SELECT uid, uname, level FROM ".$db->prefix("users")." WHERE level>0 AND uid!=$myid LIMIT $inf, $tranche";
But I need to to pull from 2 tables so it will also get the groupid . I have written the sql statement to pull from where I need to but cant figure out how to write it into php . here is the sql statement
SELECT pop_users.uid, pop_users.uname, pop_groups_users_link.groupid
FROM pop_users, pop_groups_users_link
WHERE pop_users.uid = pop_groups_users_link.uid
AND groupid =4
This pulls the info I need.
Any help would be great.





