|
There is a table association structure as follows
a table
id fid name time
01 43 ee 2016-12-22
02 41 qq 2016-12-22
03 42 88 2016-12-21
b table
id aid sj time
guid 01 1111 2016-12-22
guid 02 1111 2016-12-24
guid 03 1111 2016-12-22
guid 03 1111 2016-12-24
-------------------------------------------------- ----------------
Table a is used to store user information, and table b is a review of user information a.id = b.aid
When I only approve it once, using INNER JOIN to query everything works normally and I get the result I want!
However, after reviewing twice, more than one result is returned. Can I add a condition to the ON of the INNER JOIN to get the most relevant one to get a related data?
--------------------------------------------------
Master please help |
|