Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. $joined = "(SELECT (IF (GU.uid_fk = '$uid',1,0)) as joined ) LIMIT $offset, $limit";//because this says so, at the end this query is the same as in follow friend,
  2.  
  3.     $sql = "SELECT G.uid_fk,G.group_id, G.group_name, G.group_created, U.username, U.profile_pic,U.bio, G.group_desc, G.group_pic, U.group_count ";
  4.     $sql .= " FROM groups G, users U ";
  5.     $sql .= "JOIN group_users GU ";
  6.     $sql .= "WHERE U.status = '1' IN ";
  7.     $sql .= $joined;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement