chname VARCHAR(100),\
updatetime DATETIME,\
status TINYINT,\
- isshow TINYINT DEFAULT 1\
+ visible TINYINT DEFAULT 1\
)')
except Exception, inst:
if not ((type(inst)==MySQLdb.ProgrammingError and inst[0]==1007)or(type(inst)==MySQLdb.OperationalError and inst[0]==1050)):
VALUES (%s,%s,%s,%s,"",%s,%s,%s)', \
(bctype, chtxt, ch, csch, updatetime, "1","1"))
self.close_db(db)
+ def delete_all_epg_ch(self):
+ db = self.connect_db()
+ db[1].execute('\
+ DROP TABLE epg_ch ')
+ self.close_db(db)
def select_by_chtxt_epg_ch(self, chtxt):
db = self.connect_db()
dbexe = db[1].execute("\
r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S")
ret.append(r)
return ret
- def change_isshow_epg_ch(self,chtxt,isshow):
+ def change_visible_epg_ch(self,chtxt,visible):
db = self.connect_db()
db[1].execute("\
- UPDATE epg_ch SET isshow=%s WHERE chtxt=%s",(isshow,chtxt))
+ UPDATE epg_ch SET visible=%s WHERE chtxt=%s",(visible,chtxt))
self.close_db(db)
def set_new_status(self,dhour):
db = self.connect_db()