WIP Contract Form
This commit is contained in:
@@ -121,6 +121,13 @@ class ProductModel {
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
//var_dump($filter);exit;
|
||||
if(array_key_exists("id", $filter)) {
|
||||
$id = $db->escape($filter['id']);
|
||||
if($id) {
|
||||
$where .= " AND Product.`id` like '%$id%'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("productgroup_id", $filter)) {
|
||||
$productgroup_id = $filter['productgroup_id'];
|
||||
if(is_numeric($productgroup_id)) {
|
||||
@@ -138,14 +145,14 @@ class ProductModel {
|
||||
if(array_key_exists("name", $filter)) {
|
||||
$name = $db->escape($filter['name']);
|
||||
if($name) {
|
||||
$where .= " AND `name` like '$name'";
|
||||
$where .= " AND Product.`name` like '$name'";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("nameLike", $filter)) {
|
||||
$name = $db->escape($filter['nameLike']);
|
||||
if($name) {
|
||||
$where .= " AND `name` like '%$name%'";
|
||||
$where .= " AND Product.`name` like '%$name%'";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user