function &execute_query($buffered = true, &$link) { if ($link == $this->connection_slave and preg_match('#(^|\\s)SELECT\\s#s', $this->sql)) { $this->explain_query(); } else { $this->output("<pre>" . trim(preg_match('#(\\n\\s+)(UPDATE|INSERT|REPLACE)\\s#s', $this->sql, $match) ? str_replace($match[1], "\n", $this->sql) : $this->sql) . "</pre>"); } $this->timer_start('SQL Query'); $return = parent::execute_query($buffered, $link); $this->timer_stop(); return $return; }