SELECT ifnull(type,'待录入') type,COUNT(sigid) as VALUE from ips_rule r,ipsevents where r.id=sigid
count(column) 'column' 必须是非空克统计的 字段
Mysql
IFNULL(expr1,expr2) 函数。
如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2。IFNULL()返回一个数字或字符串值。
SELECT ifnull(type,'待录入') type,COUNT(sigid) as VALUE from ips_rule r,ipsevents where r.id=sigid
count(column) 'column' 必须是非空克统计的 字段
Mysql
IFNULL(expr1,expr2) 函数。
如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2。IFNULL()返回一个数字或字符串值。