Search through database

dears i make a website consists of Three webpage




i want to add a search box in page no 2

and if i type a keyword in it it will goto and make query
through all the next pages and bring back with results

How can i achieve that .
thx a lot for your help .


you will need to write a web service (whitelisted method) and pass the keyword to search the keyword in database. To seach through database you can either use the frappe.db.sql, frappe.db.get_values, frappe.get_list or frappe.get_all methods.


def search_keyword(keyword):
	// code to search database

from the web page/form you will need to use the to call the whitelisted method and get the result.

Thanks, Makarand

1 Like

Thx a lot dear for your help