#1 April 19, 2016 12:52pm

enkansah
Member
Registered: November 10, 2015
Posts: 5

Module Search

I've tried using the search function but it does not return anything. I must be using it wrong:

$search_string="SELECT * FROM products WHERE name LIKE '%{$search_item}%'";
$products=$productsMod->search($search_string,false,false,false,false,false);

How should i structure my query string?

Offline

#2 April 19, 2016 12:54pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Module Search

The first parameter of search is just a keyword string -- it looks like in your example you'd just pass in $search_item.

Offline

#3 April 19, 2016 12:57pm

enkansah
Member
Registered: November 10, 2015
Posts: 5

Re: Module Search

Thanks Tim. Worked.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.