如何计算SQL其中一个字段的数据个数
来源:百度知道 编辑:UC知道 时间:2024/06/07 13:40:53
从某字段条件筛选出几个数据,如何用语句在程序实现自动计算出筛选出的个数呢?
select count(*) from table where 某字段='内容'
以上,希望对你有所帮助
select count(*) from table where condition
select count(*) from 表 where 筛选条件
用mysql_num_rows($result)
直接用count(字段)不就行了吗?