1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-29 01:00:07 +02:00

LIMIT separator

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1494 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2010-04-26 16:19:26 +00:00
parent 4595348a14
commit 99a643b86e
5 changed files with 9 additions and 8 deletions

View File

@@ -260,10 +260,11 @@ if (!defined("DRIVER")) {
* @param string everything after SELECT
* @param int
* @param int
* @param string
* @return string
*/
function limit($query, $limit, $offset = 0) {
return " $query" . (isset($limit) ? "\nLIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
function limit($query, $limit, $offset = 0, $separator = " ") {
return " $query" . (isset($limit) ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
}
/** Formulate SQL modification query with limit 1