def insert(self, d): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.insert(tbname, d) n.commit()
def findByNude(self, v): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.query("select name from %s where is_nude = %s" % (tbname, v)) return n.fetchAll()
def insert(self,d): n = MySQL() n.selectDb('images') tbname = 'images' n.insert(tbname, d) n.commit()
def findByFace(self, v): n = MySQL() n.selectDb('images') tbname = 'images' n.query("select name from %s where is_face = %s" % (tbname, v)) return n.fetchAll()
def findAll(self): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' # n.query("select name from %s where updated_at <'2016-06-27 00:00:00'" %(tbname) ) # n.query("select name from %s where is_face!=1 " %(tbname) ) n.query("select name from %s " % (tbname)) return n.fetchAll()
def findByFace(self,v): n = MySQL() n.selectDb('images') tbname = 'images' n.query("select name from %s where is_face = %s" %(tbname,v)) return n.fetchAll()
def findByNude(self,v): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.query("select name from %s where is_nude = %s" %(tbname,v)) return n.fetchAll()
def findAll(self): n = MySQL() n.selectDb('images') tbname = 'images' # n.query("select name from %s where updated_at <'2016-06-27 00:00:00'" %(tbname) ) # n.query("select name from %s where is_face!=1 " %(tbname) ) n.query("select name from %s " %(tbname) ) return n.fetchAll()
def update(self, filename, result): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.update(tbname, result, "name='" + filename + "'") n.commit()
def updateFace(self, filename, count): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.update(tbname, {'is_face': count}, "name='" + filename + "'") n.commit()
def updateFace(self,filename,count): n = MySQL() n.selectDb('images') tbname = 'images' n.update(tbname, { 'is_face': count}, "name='"+filename+"'") n.commit()
def update(self,filename,result): n = MySQL() n.selectDb('images') tbname = 'youyuan_log' n.update(tbname, result, "name='"+filename+"'") n.commit()
def updateNude(self, filename, result): n = MySQL() n.selectDb('images') tbname = 'images' n.update(tbname, {'is_nude': result}, "name='" + filename + "'") n.commit()
def updateNude(self,filename,result): n = MySQL() n.selectDb('images') tbname = 'images' n.update(tbname, { 'is_nude': result}, "name='"+filename+"'") n.commit()