parameters: (self,get)
return_statement: return False
docstring: POST:
          db_name=web
          table_type=innodb
          tables=['web1','web2']
docstring_summary: POST:
          db_name=web
          table_type=innodb
          tables=['web1','web2']
docstring_tokens: POST : db_name = web table_type = innodb tables = [ web1 web2 ]
function: def AlterTable(self,get):
          '''
          POST:
          db_name=web
          table_type=innodb
          tables=['web1','web2']
          '''
          if not self.DB_MySQL:self.DB_MySQL = panelMysql.panelMysql()
          db_name = get.db_name
          table_type = get.table_type
          tables = json.loads(get.tables)
  
          if not db_name or not tables: return False
          
          mysql_table = self.map_to_list(self.DB_MySQL.query('show tables from `%s`' % db_name))
          ret=[]
          if type(mysql_table)==list:
              if len(mysql_table)>0:
                  for i in mysql_table:
                      for i2 in tables:
                          if i2==i[0]:
                              ret.append(i2)
                  if len(ret)>0:
                      for i in ret:
                          self.DB_MySQL.execute('alter table `%s`.`%s` ENGINE=`%s`' % (db_name,i,table_type))
                      return True
          return False
function_tokens: def AlterTable ( self , get ) : if not self . DB_MySQL : self . DB_MySQL = panelMysql . panelMysql ( ) db_name = get . db_name table_type = get . table_type tables = json . loads ( get . tables ) if not db_name or not tables : return False mysql_table = self . map_to_list ( self . DB_MySQL . query ( 'show tables from `%s`' % db_name ) ) ret = [ ] if type ( mysql_table ) == list : if len ( mysql_table ) > 0 : for i in mysql_table : for i2 in tables : if i2 == i [ 0 ] : ret . append ( i2 ) if len ( ret ) > 0 : for i in ret : self . DB_MySQL . execute ( 'alter table `%s`.`%s` ENGINE=`%s`' % ( db_name , i , table_type ) ) return True return False