[buddypress-trac] [BuddyPress] #4482: Better member type support in bp_group_has_members()
    buddypress-trac 
    noreply at wordpress.org
       
    Wed May 15 02:51:18 UTC 2013
    
    
  
#4482: Better member type support in bp_group_has_members()
--------------------------+---------------------------
 Reporter:  boonebgorges  |       Owner:  boonebgorges
     Type:  enhancement   |      Status:  assigned
 Priority:  high          |   Milestone:  1.8
Component:  Groups        |     Version:
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |
--------------------------+---------------------------
Comment (by trishasalas):
 @boonegorges you're throwing me off with that oop stuff ;)  (although I
 have honestly wondered about using that within WordPress so glad to see
 it)  When I said I know SQL I mean I know SQL, I am very comfortable in a
 database, highly frustrated that I can't easily translate that to what
 needs to happen here. ...I am working with the functions in question and
 understanding so far, I want to slog through it as it's the best way to
 learn even if what I end up with doesn't work.  I'll cry uncle tomorrow :)
 Here is my SQL...there are a couple of joins for my purposes mostly to see
 the data:
 {{{
 SELECT
     `bp_groups_members`.`id`
     , `bp_groups_members`.`user_id`
     , `bp_groups_members`.`is_admin`
     , `bp_groups_members`.`is_mod`
     , `bp_groups_members`.`is_banned`
     , `users`.`user_nicename`
     , `users`.`user_email`
     , `bp_groups`.`name`
 FROM
     `bp_groups_members`
     INNER JOIN `users`
         ON (`bp_groups_members`.`user_id` = `users`.`ID`)
     INNER JOIN `bp_groups`
         ON (`bp_groups_members`.`group_id` = `bp_groups`.`id`);
 }}}
 I'm seeing that the joins aren't necessary with the way the BP_User_Query
 function is written.  I'm also seeing that using PHP with the sql is way
 cool.
 Feeling like such a dufus...but maybe making myself vulnerable will help
 others do the same.  Appreciating more and more the open source community.
-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4482#comment:10>
BuddyPress <http://buddypress.org/>
BuddyPress
    
    
More information about the buddypress-trac
mailing list