php - How to display users from two MySQL tables -
I have two mysql table-members and addclique member table details the details of all users, while adclock table is two column- There is a 'buddy' table with Adride, which contains the user's ID, which sends friend requests and click_id, contains the user's ID that the friend accepts the request.
Please try to select friends of a particular user, but there is a problem getting the details of details (photos, names, etc.) from the members table because I do not know At which point the members are included in the table Addclique table
$ sql = "SELECT i. *, M * to add members from m.id = ******* * Where adder_id =: id or clique_id =: id "; $ Result = $ db- & gt; Query ($ sql, array ('id' = & gt; $ _SESSION ['id']); The questions below will select all those members who have been added by a special person and all the members who have added the same person.
Choose m * Join the member M In an MID = a.adder_id, where a.clique_id =: Select the ID association from M to * Member * add add at addclique_id to addclique where a.adder_id =: id
Comments
Post a Comment