MySQL a statement associates two fields of another table at the same time

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!

Mar.31,2021

 

select
(select name from user where user.uid = c.uid) as replyer,
(select name from user where user.uid = c.to_uid) as replyed,
c.content
from comment c
where id=1

it is understood that the data is in the comment table, but comment.uid and comment.to_uid need to be escaped into names.
the above sql may provide some solutions.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37e29-2c0d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37e29-2c0d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?