fix: mysql syntax issue

This commit is contained in:
Bhavesh Maheshwari
2022-11-03 10:59:20 +05:30
committed by GitHub
parent 7a7b1d33c3
commit 4d9bbd4c9c

View File

@@ -699,7 +699,8 @@ def get_pending_work_orders(doctype, txt, searchfield, start, page_length, filte
AND `company` = %(company)s
AND `name` like %(txt)s
ORDER BY
(case when locate(%(_txt)s, name) > 0 then locate(%(_txt)s, name) else 99999 end) name
(case when locate(%(_txt)s, name) > 0 then locate(%(_txt)s, name) else 99999 end),
name
LIMIT
%(start)s, %(page_length)s""",
{