mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 21:48:27 +00:00
get_query to server side
This commit is contained in:
@@ -96,8 +96,9 @@ def get_events(start, end, filters=None):
|
||||
def get_project(doctype, txt, searchfield, start, page_len, filters):
|
||||
from controllers.queries import get_match_cond
|
||||
return webnotes.conn.sql(""" select name from `tabProject`
|
||||
where %(key)s like "%(txt)s" %(mcond)s
|
||||
order by name limit %(start)s, %(page_len)s
|
||||
""" % {'key': searchfield, 'txt': "%%%s%%" % txt,
|
||||
'mcond':get_match_cond(doctype, searchfield),
|
||||
'start': start, 'page_len': page_len})
|
||||
where %(key)s like "%(txt)s"
|
||||
%(mcond)s
|
||||
order by name
|
||||
limit %(start)s, %(page_len)s """ % {'key': searchfield,
|
||||
'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield),
|
||||
'start': start, 'page_len': page_len})
|
||||
Reference in New Issue
Block a user