fix: Switch the position of LIMIT and OFFSET
MariaDB needs LIMIT before OFFSET. Whereas Postgres accepts LIMIT and OFFSET in any order
This commit is contained in:
parent
1556805232
commit
02ff1a48da
1 changed files with 3 additions and 2 deletions
|
|
@ -38,7 +38,8 @@ def get_feed(start, page_length):
|
|||
{match_conditions_comment}
|
||||
) X
|
||||
order by X.creation DESC
|
||||
OFFSET %(start)s LIMIT %(page_length)s"""
|
||||
LIMIT %(page_length)s
|
||||
OFFSET %(start)s"""
|
||||
.format(match_conditions_comment = match_conditions_comment,
|
||||
match_conditions_communication = match_conditions_communication), {
|
||||
"user": frappe.session.user,
|
||||
|
|
@ -55,4 +56,4 @@ def get_heatmap_data():
|
|||
where
|
||||
date(creation) > subdate(curdate(), interval 1 year)
|
||||
group by date(creation)
|
||||
order by creation asc"""))
|
||||
order by creation asc"""))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue