I am trying to write a query which allows filtering using the search box. but I am getting the error
Binding index 1 when only 1 parameters are expected
The query works fine when entered such as:
SELECT * FROM lead
WHERE status != 'Dead' AND status != 'Converted'
ORDER BY account_name
limit 20 offset {{ (LeadTable.pageNo - 1) * 20 }};
But when I add WHERE account_name like '%{{LeadTable.searchText}}%' I get the error like the query below.
SELECT * FROM lead
WHERE account_name like '%{{LeadTable.searchText}}%' AND status != 'Dead' AND status != 'Converted'
OR name like '%{{LeadTable.searchText}}%' AND status != 'Dead' AND status != 'Converted'
ORDER BY account_name
limit 20 offset {{ (LeadTable.pageNo - 1) * 20 }};