selectQueryBuild() method
This commit is contained in:
parent
5d337fe04c
commit
700a78b377
|
@ -452,6 +452,19 @@ username.form['auth[driver]'].onchange();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Build SQL query used in select
|
||||||
|
* @param array result of selectColumnsProcess()[0]
|
||||||
|
* @param array result of selectSearchProcess()
|
||||||
|
* @param array result of selectColumnsProcess()[1]
|
||||||
|
* @param array result of selectOrderProcess()
|
||||||
|
* @param int result of selectLimitProcess()
|
||||||
|
* @param int index of page starting at zero
|
||||||
|
* @return string empty string to use default query
|
||||||
|
*/
|
||||||
|
function selectQueryBuild($select, $where, $group, $order, $limit, $page) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/** Query printed after execution in the message
|
/** Query printed after execution in the message
|
||||||
* @param string executed query
|
* @param string executed query
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -230,7 +230,16 @@ if (!$columns) {
|
||||||
$page = floor(max(0, $found_rows - 1) / $limit);
|
$page = floor(max(0, $found_rows - 1) / $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "SELECT" . limit((+$limit && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from, ($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by, ($limit != "" ? +$limit : null), ($page ? $limit * $page : 0), "\n");
|
$query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
|
||||||
|
if (!$query) {
|
||||||
|
$query = "SELECT" . limit(
|
||||||
|
(+$limit && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from,
|
||||||
|
($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by,
|
||||||
|
($limit != "" ? +$limit : null),
|
||||||
|
($page ? $limit * $page : 0),
|
||||||
|
"\n"
|
||||||
|
);
|
||||||
|
}
|
||||||
echo $adminer->selectQuery($query);
|
echo $adminer->selectQuery($query);
|
||||||
|
|
||||||
$result = $connection->query($query);
|
$result = $connection->query($query);
|
||||||
|
|
|
@ -4,6 +4,7 @@ Edit strings with \n in textarea
|
||||||
Time out long running database list and select count
|
Time out long running database list and select count
|
||||||
Use VALUES() in INSERT+UPDATE export
|
Use VALUES() in INSERT+UPDATE export
|
||||||
Style logout button as link
|
Style logout button as link
|
||||||
|
selectQueryBuild() method (customization)
|
||||||
|
|
||||||
Adminer 3.5.1 (released 2012-08-10):
|
Adminer 3.5.1 (released 2012-08-10):
|
||||||
Support same name fields in CSV export
|
Support same name fields in CSV export
|
||||||
|
|
|
@ -411,6 +411,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectQueryBuild($select, $where, $group, $order, $limit, $page) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
function messageQuery($query) {
|
function messageQuery($query) {
|
||||||
return " <span class='time'>" . @date("H:i:s") . "</span><!--\n" . str_replace("--", "--><!-- ", $query) . "\n-->";
|
return " <span class='time'>" . @date("H:i:s") . "</span><!--\n" . str_replace("--", "--><!-- ", $query) . "\n-->";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue