mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix SQL error when list count is 0
This commit is contained in:
parent
53d54fbeaf
commit
6b6c0eacfc
1 changed files with 10 additions and 2 deletions
|
|
@ -244,7 +244,11 @@ class Query extends VariableBase
|
|||
// Compose the LIMIT/OFFSET clause.
|
||||
if ($this->navigation && $this->navigation->list_count && !$count_only)
|
||||
{
|
||||
$result .= ' LIMIT ' . $this->_arrangeLimitOffset($this->navigation);
|
||||
$limit_offset = $this->_arrangeLimitOffset($this->navigation);
|
||||
if ($limit_offset !== '')
|
||||
{
|
||||
$result .= ' LIMIT ' . $limit_offset;
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap in a subquery if necesary.
|
||||
|
|
@ -399,7 +403,11 @@ class Query extends VariableBase
|
|||
// Compose the LIMIT/OFFSET clause.
|
||||
if ($this->navigation && $this->navigation->list_count)
|
||||
{
|
||||
$result .= ' LIMIT ' . $this->_arrangeLimitOffset($this->navigation);
|
||||
$limit_offset = $this->_arrangeLimitOffset($this->navigation);
|
||||
if ($limit_offset !== '')
|
||||
{
|
||||
$result .= ' LIMIT ' . $limit_offset;
|
||||
}
|
||||
}
|
||||
|
||||
// Return the final query string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue