diff --git a/app/tmnet_db_func.py b/app/tmnet_db_func.py index 21db494..f00dcaa 100644 --- a/app/tmnet_db_func.py +++ b/app/tmnet_db_func.py @@ -170,8 +170,8 @@ class TmnetDbHelper(TableDbHelperBase): if (t2.location is not null, t2.location, t1.location) as location, t1.nodeid, t1.area_id - from (select name,crossid, location,nodeid, area_id from `cross` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 and crossid = %s) as t1 - left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 and crossid = %s) as t2 on t1.crossid=t2.crossid + from (select name,crossid, location,nodeid, area_id from `cross` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 and crossid = '%s') as t1 + left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 and crossid = '%s') as t2 on t1.crossid=t2.crossid """ % (nodeid, area_id, crossid, nodeid, area_id, crossid) return self.do_select(sql)