$start = microtime(true);
$search = $this->_conn->query($query, $data);
if ($print) {
- echo $adminer->selectQuery("$query: " . print_r($data, true), format_time($start));
+ echo $adminer->selectQuery("$query: " . print_r($data, true), $start);
}
if (!$search) {
return false;
/** Query printed in select before execution
* @param string query to be executed
- * @param string elapsed time
+ * @param float start time of the query
* @return string
*/
- function selectQuery($query, $time) {
+ function selectQuery($query, $start) {
global $jush, $driver;
- $return = "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>($time)</span>"
+ $return = "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>(" . format_time($time) . ")</span>"
. (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
;
$print = "</p>\n"; // required for IE9 inline edit
$start = microtime(true);
$return = $this->_conn->query($query);
if ($print) {
- echo $adminer->selectQuery($query, format_time($start));
+ echo $adminer->selectQuery($query, $start);
}
return $return;
}
}
}
- function selectQuery($query, $time) {
- return "<!--\n" . str_replace("--", "--><!-- ", $query) . "\n($time)\n-->\n";
+ function selectQuery($query, $start) {
+ return "<!--\n" . str_replace("--", "--><!-- ", $query) . "\n(" . format_time($start) . ")\n-->\n";
}
function rowDescription($table) {
return $this->_applyPlugin(__FUNCTION__, $args);
}
- function selectQuery($query, $time) {
+ function selectQuery($query, $start) {
$args = func_get_args();
return $this->_applyPlugin(__FUNCTION__, $args);
}