How is the query statement written in thinkphp?
Similar to the kind of QQ, a user information table, the user has some friends, how can I query the user's friend information displayed on the page. Thank you, GGMM!
------Solution--------------------
------Solution--------------------
At least you should give the relevant table structure.
------Solution--------------------
What does it have to do with frames?
You design the relevant database, the corresponding search data can be
You can post the structure of the user table and the buddy table
------Solution--------------------
Presumably the statement, that, assuming the need for UserAccount,
SQL Code
SELECT f.*, U.useraccount from Usersfriend as F left JOIN [user table name] as U on f.frienduserid=u.useridwhere f.userid=[user ID to find]
------Solution--------------------
TP Union Query No, I use TP also direct query (SQL statement)
------Solution--------------------
Basic sql:
Select usersfriend.*
From Usersfriend, userinformation
where Usersfriend.frienduserid = Userinformation.userid
------Solution--------------------
Pass by, accumulate points