开始:
$num = 0;
$total = 0;
中间是这样查询的:
sqp="select sum(times) as times from 200309 where ad_id IN (75,1892,1897,1900,1907,1914,1919) and play_date='2003-09-02'"执行查询不贴出来了,结果这么得到:
$num = $DB->f("times");
$total += $num;
echo $total;
exit;echo 没有值,是空的。
就这样了。我找不出原因来。
$num = 0;
$total = 0;
中间是这样查询的:
sqp="select sum(times) as times from 200309 where ad_id IN (75,1892,1897,1900,1907,1914,1919) and play_date='2003-09-02'"执行查询不贴出来了,结果这么得到:
$num = $DB->f("times");
$total += $num;
echo $total;
exit;echo 没有值,是空的。
就这样了。我找不出原因来。
有反应吗??
有反应吗??
有反应,能显示出值324来
可是求和之后就没有东西了,怎么回事
echo $num = $DB->f("times");
echo $total += $num;
echo $total;
建议改字段类型。
char字符求和时,php解析的求和值为0。