public function execute() { try { Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE qu_g_logs DROP INDEX `IDX_qu_g_logs_1`'); } catch (Exception $e) { } Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE qu_g_logs ADD INDEX `IDX_qu_g_logs_1` (`accountuserid` ASC, `created` ASC)'); }
public function execute() { $q = new Gpf_SqlBuilder_SelectBuilder(); $q->select->add('fixedcost'); $q->from->add(Pap_Db_Table_Transactions::getName()); $q->limit->set(0,1); try { $q->getAllRows(); return; } catch(Exception $e) { } $db = Gpf_DbEngine_Database::getDatabase(); $db->execute("ALTER TABLE qu_pap_transactions ADD fixedcost FLOAT NOT NULL DEFAULT '0'"); }
public function execute() { try { Gpf_DbEngine_Database::getDatabase()->execute('SELECT `merchantnote` FROM `qu_pap_accountings`'); Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE `qu_pap_accountings` DROP `merchantnote`'); } catch (Gpf_DbEngine_Driver_Mysql_SqlException $e) { } try { Gpf_DbEngine_Database::getDatabase()->execute('SELECT `systemnote` FROM `qu_pap_accountings`'); Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE `qu_pap_accountings` DROP `systemnote`'); } catch (Gpf_DbEngine_Driver_Mysql_SqlException $e) { } try { Gpf_DbEngine_Database::getDatabase()->execute('SELECT `invoiceid` FROM `qu_pap_accountings`'); } catch (Gpf_DbEngine_Driver_Mysql_SqlException $e) { Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE `qu_pap_accountings` ADD `invoiceid` CHAR( 8 ) DEFAULT NULL AFTER `accountid`'); } }
protected function createDatabase() { return Gpf_DbEngine_Database::getDatabase(); }
public function execute() { try { Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE `qu_pap_visits1` DROP INDEX `fk_qu_pap_visits1_qu_g_accounts1`'); } catch (Exception $e) { } }
public function execute() { try { Gpf_DbEngine_Database::getDatabase()->execute('ALTER TABLE `qu_pap_transactions` ADD INDEX `IDX_qu_pap_transactions_data1` ( `data1` )'); } catch (Exception $e) { } }
//variables section echo '<h2>Server variables</h2>'; echo '<table border="0" cellpadding="3" width="600"> <tr class="h"><th>Variable</th><th>Value</th></tr>'; $result = Gpf_DbEngine_Database::getDatabase()->execute("show variables"); while ($row=$result->fetchArray()) { echo '<tr><td class="e">'.$row['Variable_name'].' </td><td class="v">'.$row['Value'].' </td></tr>'; } echo '</table><br/>'; //server status echo '<h2>Server status</h2>'; echo '<table border="0" cellpadding="3" width="600"> <tr class="h"><th>Variable</th><th>Value</th></tr>'; $result = Gpf_DbEngine_Database::getDatabase()->execute("SHOW STATUS"); while ($row=$result->fetchArray()) { echo '<tr><td class="e">'.$row['Variable_name'].' </td><td class="v">'.$row['Value'].' </td></tr>'; } echo '</table><br/>'; //process list - NOT used /*echo '<h2>Process list</h2>'; echo '<table border="0" cellpadding="3" width="600"> <tr class="h"><th>Id</th><th>User</th><th>Host</th><th>db</th><th>Command</th><th>Time</th><th>State</th><th>Info</th></tr>'; $result = Gpf_DbEngine_Database::getDatabase()->execute("SHOW PROCESSLIST"); while ($row=$result->fetchArray()) { echo '<tr><td class="e">'.$row['Id'].' </td><td class="v">'.$row['User'].' </td><td class="v">'.$row['Host'].' </td><td class="v">'.$row['db'].' </td><td class="v">'.$row['Command'].' </td><td class="v">'.$row['Time'].' </td><td class="v">'.$row['State'].' </td><td class="v">'.$row['Info'].' </td></tr>'; } echo '</table><br/>';*/