mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +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`";
|
||||
|
||||
if($limit) {
|
||||
$searchQuery .= " LIMIT ".$offset.",".$limit;
|
||||
$searchQuery .= " LIMIT ".$limit." OFFSET ".$offset;
|
||||
}
|
||||
|
||||
// Send the complete search query to the database.
|
||||
|
@ -1006,7 +1006,7 @@ class SeedDMS_Core_DMS {
|
|||
else
|
||||
$offset = 0;
|
||||
if($limit)
|
||||
$searchQuery .= " LIMIT ".$offset.",".$remain;
|
||||
$searchQuery .= " LIMIT ".$limit." OFFSET ".$offset;
|
||||
|
||||
// Send the complete search query to the database.
|
||||
$resArr = $this->db->getResultArray($searchQuery);
|
||||
|
|
Loading…
Reference in New Issue
Block a user