OSDN Git Service

fix install error.
[rec10/rec10-git.git] / rec10 / trunk / src / dbMySQL.py
index 6f74f6f..4486f54 100644 (file)
@@ -95,7 +95,7 @@ class DB_MySQL:
             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)):
@@ -109,6 +109,11 @@ class DB_MySQL:
         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("\
@@ -179,10 +184,10 @@ class DB_MySQL:
             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()