移除掉你代码中的\r\n 加上你的语法是mysql的,
通过round来四舍五入,帮你排版了下
select *from (select 37 as sortid,
'' as 序号,
'建筑、安装工程费合计(含税):' as 定额号,
'' as 名称,
'' as 单位,
0 as 数量,
0 as 基价,
round(dej) as 基价合计,
0 as 市价,
round(scj) as 市场合计,
round(schs) as 除税
from cost_tj_tjbls as b
inner join (select a.sortid, c.tid
from cost_tj_fyb as a
inner join cost_tj_fylist as c
on c.id = a.fyid
where a.xmid = @xmid
and a.gcid = @gcid
and a.code = 'GCFY') as d
on d.sortid = b.fybbl
and d.tid = b.fybid
where b.tjbid is null
and b.gcid = @gcid Limit 1) a
修改前后对比代码:
1、语法没有问题2、
echo "delete from $DB.${TB}$FIRST where SrcGCID=$gcid" |$MYSQL
可换成
$MYSQL -D$DB -e "delete from ${TB}$FIRST where SrcGCID=$gcid"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)