now I have encountered a statement that cannot be written when designing a mysql article comment section that encounters a MySQL statement. Look at the table first:
the last result I want is: Zhang San replied to Li Si: the article is very good
according to my experience, using MySQL"s where method can only get the name of uid or to_uid in user in comment table, for example:
select * from user u, comment c where u.uid = c.uid
what comes out of the above sentence is the name value of the commentator (Zhang San) in the comment table, and the name value of Li Si can not be reached. Is there any way to get the name value of Zhang San and Li Si at the same time? thank you for your advice!