public function showVariable($name)
{
$value = $this->selectOne('SHOW VARIABLES LIKE '.$this->quoteString($name));
- if ($value[0] == $name) {
- return $value[1];
+ if ($value['Variable_name'] == $name) {
+ return $value['Value'];
} else {
throw new Horde_Db_Exception($name . ' is not a recognized variable');
}
$indexes = array();
foreach ($result as $row) {
- if ($currentIndex != $row[0]) {
- $currentIndex = $row[0];
+ if ($currentIndex != $row['relname']) {
+ $currentIndex = $row['relname'];
$indexes[] = $this->makeIndex(
- $tableName, $row[0], false, $row[1] == 't', array());
+ $tableName, $row['relname'], false, $row['indisunique'] == 't', array());
}
- $indexes[count($indexes) - 1]->columns[] = $row[2];
+ $indexes[count($indexes) - 1]->columns[] = $row['attname'];
}
$this->_cache->set("tables/indexes/$tableName", serialize($indexes));
}
// [primary_key, sequence]
- return array($result[0], $result[1]);
+ return array($result['attname'], $result['relname']);
}
/**