标签: php sql
enter image description here
想要找到总共两列或更多的总列数
答案 0 :(得分:1)
使用GROUP BY然后SUM(condition)获取您的点数:
GROUP BY
SUM(condition)
SELECT id AS ID, SUM(total = 'total' ) AS Total, FROM table GROUP BY ID
这样的事情应该有效。