Ejemplo n.º 1
0
 /**
  * Checks if table exists in database and returns all fields of table.
  * Otherwise returns boolean false.
  *
  * @param  string  $tableName  Name of table
  * @return array|boolean       Array of SHOW (FULL) COLUMNS FROM ... in SQL or boolean FALSE
  */
 protected function getAllTableColumns($tableName)
 {
     if ($this->checkTableExists($tableName)) {
         $fields = $this->_db->getTableFields($tableName, false);
         if (isset($fields[$tableName])) {
             return $fields[$tableName];
         }
     }
     return false;
 }