I have a small problem please if someone can help me = D, I will be very grateful. When looking for products for sale: just pull me to find a single name or field, I want to search for example "tablet asus" two fields.
this is my code:
public static function getLike($p){
$sql = "select * from product inner join category on product.category_id=category.id_categoria where name like '%$p%' or marca like '%$p%' or modelo like '%$p%' or barcode like '%$p%' or description like '%$p%'";
$query = Executor::doit($sql);
return Model::many($query[0],new ProductData());
}