def __addDoctoTable(doc): rows=table.getRecordsById(doc.source, doc.uid) if rows==-1: print '%s getRecordsById error'%(doc.source) return if len(rows[0])>0: exrecord=list(rows[0]) mtype,click='',0 exrecord+=[mtype,click] tablemerge.InsertItem(dbconfig.mergetable, exrecord)
def __addDoctoTable(doc): rows=table.getRecordsById(doc.source, doc.uid) if rows==-1: print '%s getRecordsById error'%(doc.source) return if len(rows[0])>0: exrecord=list(rows[0]) vid,web,vtype=exrecord[1],exrecord[13],exrecord[8] mid,mtype,click=toolpit.getMid(web,vid),classify.getMtype(web, vtype),0 exrecord+=[mid,mtype,click] tablemerge.InsertItem(dbconfig.mergetable, exrecord)