}
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
- return " $query$where" . (isset($limit) ? ($where ? " AND" : $separator . "WHERE") . ($offset ? " rownum > $offset AND" : "") . " rownum <= " . ($limit + $offset) : "");
+ return ($offset ? " * FROM (SELECT t.*, rownum AS rnum FROM (SELECT $query$where) t WHERE rownum <= " . ($limit + $offset) . ") WHERE rnum > $offset"
+ : (isset($limit) ? " * FROM (SELECT $query$where) WHERE rownum <= " . ($limit + $offset)
+ : " $query$where"
+ ));
}
function limit1($query, $where) {
echo "<form action='' method='post' enctype='multipart/form-data'>\n";
$rows = array();
while ($row = $result->fetch_assoc()) {
+ if ($page && $jush == "oracle") {
+ unset($row["RNUM"]);
+ }
$rows[] = $row;
}
// use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
Highlight SQL code in textarea
Append new index with auto index selection (bug #3282127)
Bit type default value
+Pagination support (Oracle)
Autocomplete for big foreign keys (Editor)
+Display name of the referenced record in PostgreSQL (Editor)
Customizable favicon (customization)
Method name can return a link (customization)