我有一个评论系统;我有一个查询
SELECT ShoutID,Message, User, Date, ShoutImageThumb, ShoutImageBig,UserID,
Email, FullName, UserImageThumb, Admin FROM shoutbox LEFT JOIN users ON
users.Email = shoutbox.User ORDER BY ShoutID DESC LIMIT 10
当它通过页面上的循环时,我在循环中运行另一个查询以获取该消息的评论
SELECT users.UserID, users.Email, users.FullName, shoutboxcomments.ShoutID,
shoutboxcomments.`Comment`, shoutboxcomments.`Date`,
shoutboxcomments.`User`, shoutboxcomments.CommentID FROM shoutboxcomments
LEFT JOIN users ON users.Email = shoutboxcomments.User
WHERE ShoutID = '.$ShoutID.' ORDER BY CommentID ASC
是否可以加入这些查询或如何简化它,因为我使用 mvc 架构在 php 中构建