
darius 发表于 2023-1-25 11:36
这玩意儿还是在程序逻辑中写吧,sql中count统计后为一行一列,按id查出来的详情信息又可能有0到n行,硬写在 ...
qq6r 发表于 2023-1-25 11:48
sel t.id,count(t.id),count(t2.parent_id) from t left join t2 on t.id = t2.parent_id where t.id = 1 ...
| 欢迎光临 全球主机交流论坛 (https://www.iloc.eu.org/) | Powered by Discuz! X3.4 |