|
|
Q:在平台查询数据库数据,总是提示domainid不存在,加上域ID,又提示是未知列,在数据库客户端查询,发现该表根本就不存在这个表,现在该怎么办。我是要查询指定模块下的所以表单名称。我的sql是:var sql= "select name as item_name from obpm.t_dynaform_form where module in(select ID from obpm.t_module where name='人事')";
A:不存在domainid的表单,查询时可使用'"+getDomainid()+"' as DOMAINID的方法。将您的sql修改成下述即可:
var sql = "select '"+getDomainid()+"' as domainid,name as item_name from obpm.t_dynaform_form where module in(select id from obpm.t_module where name='人事')"; |
|