mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +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.
|
// Compose the LIMIT/OFFSET clause.
|
||||||
if ($this->navigation && $this->navigation->list_count && !$count_only)
|
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.
|
// Wrap in a subquery if necesary.
|
||||||
|
|
@ -399,7 +403,11 @@ class Query extends VariableBase
|
||||||
// Compose the LIMIT/OFFSET clause.
|
// Compose the LIMIT/OFFSET clause.
|
||||||
if ($this->navigation && $this->navigation->list_count)
|
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.
|
// Return the final query string.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue