firegunzx 回复 fuzao1314(提问者)可以,这样写sql,select 时间,sum(值),\'折线1\' as type from 表名 union select 时间,sum(值),\'折线2\' as type from 表名 where ds2条件 union select 时间,sum(值),\'折线3\' as type from 表名 where ds3条件 union select 时间,sum(值),\'折线4\' as type from 表名 where ds4条件
然后再折线图里,分类用 时间 , 系列名用type ,值用sum(值)
fuzao1314(提问者) 回复 firegunzxselect zgsx,sum(zgsx),
as type from aj_yinh union select 时间,sum(zgsx),
as type from aj_yinh where NOW()>a.zgsx AND a.yhstate<>\'yibihuan\' union select zgsx,sum(zgsx),
as type from aj_yinh where NOW()\'yibihuan\' union select zgsx,sum(zgsx),
as type from aj_yinh where a.yhstate=\'yibihuan\' union select zgsx,sum(zgsx)
是这样吗?预览就报错了。实在不好意思,我是初学,如果你会麻烦告诉我下,谢谢了