def DELETE(self):
input_data = web.data()
data = urlparse.parse_qs(input_data)
v_ct_fids = db.query('SELECT distinct c.name FROM t_ci c WHERE c.family_id = $fid and c.endtime=$endtime',vars={'fid':data['fid'][0],'endtime':ENDTIME})
json_en = demjson.encode(v_ct_fids)
json_de = demjson.decode(json_en)
v_ct_fid_num = len(json_de)
if v_ct_fid_num == 0:
return 2 #there are no records to delete in table t_ci
elif v_ct_fid_num > 1:
return 3 #there are more than one records to delete in table t_ci
#Notice?besides t_ci?information in t_ci_attribute and t_ci_relation should be deleted too
v_curtime = time.strftime("%Y%m%d%H%M%S", time.localtime())
n = fn_delete_ci(data['fid'][0],v_curtime,data['change_log'][0])
return n
评论列表
文章目录