Beispiel #1
0
 public function setConfigData($path, $value, $scope = 'default', $scopeId = 0, $inherit = 0)
 {
     $this->_conn->showTableStatus($this->getTable('core/config_data'));
     // this is a fix for mysql 4.1
     $this->_conn->raw_query("replace into " . $this->getTable('core/config_data') . " (scope, scope_id, path, value) values ('{$scope}', {$scopeId}, '{$path}', '{$value}')");
     return $this;
 }
Beispiel #2
0
 /**
  * Retrieve table status
  *
  * @param string $tableName
  * @return Varien_Object
  */
 public function getTableStatus($tableName)
 {
     $row = $this->_write->showTableStatus($tableName);
     if ($row) {
         $statusObject = new Varien_Object();
         $statusObject->setIdFieldName('name');
         foreach ($row as $field => $value) {
             $statusObject->setData(strtolower($field), $value);
         }
         $cntRow = $this->_write->fetchRow($this->_write->select()->from($tableName, 'COUNT(1) as rows'));
         $statusObject->setRows($cntRow['rows']);
         return $statusObject;
     }
     return false;
 }