mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-10 11:02:41 +00:00
make LIMIT in sql more database independent
This commit is contained in:
parent
9f042ad037
commit
b6d63b8705
|
@ -759,7 +759,7 @@ class SeedDMS_Core_DMS {
|
||||||
$searchQuery = "SELECT DISTINCT `tblFolders`.* ".$searchQuery." GROUP BY `tblFolders`.`id`";
|
$searchQuery = "SELECT DISTINCT `tblFolders`.* ".$searchQuery." GROUP BY `tblFolders`.`id`";
|
||||||
|
|
||||||
if($limit) {
|
if($limit) {
|
||||||
$searchQuery .= " LIMIT ".$offset.",".$limit;
|
$searchQuery .= " LIMIT ".$limit." OFFSET ".$offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the complete search query to the database.
|
// Send the complete search query to the database.
|
||||||
|
@ -1006,7 +1006,7 @@ class SeedDMS_Core_DMS {
|
||||||
else
|
else
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
if($limit)
|
if($limit)
|
||||||
$searchQuery .= " LIMIT ".$offset.",".$remain;
|
$searchQuery .= " LIMIT ".$limit." OFFSET ".$offset;
|
||||||
|
|
||||||
// Send the complete search query to the database.
|
// Send the complete search query to the database.
|
||||||
$resArr = $this->db->getResultArray($searchQuery);
|
$resArr = $this->db->getResultArray($searchQuery);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user