原SQL语句
select user_id id,
user_name xm,
login_id,
jgbm,
password,
'1' logintype,
'' zplj
from sc_users a
where a.login_id='admin' and a.password='1'
union
select id,
xm,
yx login_id,
password,
'2' logintype,
zplj
from ty_zcxx
where yx='admin' and password='8FAC419DC06AE7FCDA80424B0F7761C2'
order by logintype
错误原因:union后的语句中少了jgbm,字段
问题解决