2024-07-29 16:00:38.979135
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:00:48.796123
SELECT COUNT(*) FROM 0_stock_master WHERE mb_flag!='D'

2024-07-29 16:00:48.874421
SELECT COUNT(*) FROM 0_movement_types

2024-07-29 16:00:48.891204
SELECT l.loc_code, l.location_name, l.inactive
                FROM 0_locations l 
                    LEFT JOIN 0_locations pl ON 
                            l.loc_code = pl.reservation_loc_code 
                WHERE pl.loc_code IS NULL ORDER BY l.location_name

2024-07-29 16:00:48.903063
SELECT project_id, project_code, value_name, description, project_name  
            FROM 0_projects_master pm 
                    INNER JOIN 0_user_data_access_groups udag ON
                            pm.dag_id = udag.dag_id  
                    LEFT JOIN 0_list_values lv ON 
                            pm.department_id = lv.id 
            WHERE pm.inactive = 0 AND udag.user_id =211 AND (pm.project_id='') ORDER BY value_name,pm.description

2024-07-29 16:00:49.341488
SELECT description FROM 0_projects_master WHERE project_id=''

2024-07-29 16:00:49.569998
SELECT  ap.* 
                FROM 0_project_approval_paths pap, 
                        0_approval_path ap 
                WHERE pap.approval_path_id = ap.approval_path_id AND 
                        pap.project_id = '' AND 
                        pap.approval_path_type = 'PR'

2024-07-29 16:00:49.582773
SELECT next_reference FROM 0_sys_types WHERE type_id = '63'

2024-07-29 16:00:49.587418
SELECT real_name FROM 0_users WHERE id ='211'

2024-07-29 16:00:49.588624
SELECT p.*,
                    dn.value_name department_name,
                    dm.name customer_name,
                    u.real_name project_manger_name 
        	FROM 0_projects_master p 
                INNER JOIN 0_list_values dn ON 
                        p.department_id = dn.id 
                LEFT JOIN 0_debtors_master dm ON 
                        p.customer_id = dm.debtor_no 
                LEFT JOIN 0_users u ON 
                        p.project_manager_id = u.id
            WHERE p.project_id =''

2024-07-29 16:00:49.590497
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:00:49.594354
SELECT stock_id, s.description, c.description, s.inactive, s.editable
			FROM 0_stock_master s,0_stock_category c WHERE s.category_id=c.category_id AND s.inactive = 0 AND (stock_id='') ORDER BY c.description,stock_id

2024-07-29 16:00:49.595882
SELECT sm.*, material_cost + labour_cost + overhead_cost AS standard_cost, u.decimals, u.name unit_name 
		FROM 0_stock_master sm,0_item_units u
		WHERE stock_id = '' AND 
                sm.units = u.abbr

2024-07-29 16:00:49.597413
SELECT au.alternate_unit, iu.name 
                FROM 0_alternate_units au,
                        0_item_units iu  
                WHERE au.alternate_unit = iu.abbr AND 
                        au.stock_id = '' AND au.inactive = 0 ORDER BY name

2024-07-29 16:00:49.609519
SELECT pt.task_id, pt.task_code, boqg.description, pt.description, pt.budget, pt.budget_used, pt.budget_allocated  
            FROM 0_project_tasks pt 
                    LEFT JOIN 0_project_task_groups ptg ON 
                        pt.task_group_id = ptg.id 
                    LEFT JOIN 0_project_boq_item_groups boqg ON 
                        ptg.boq_group_id = boqg.id 
            WHERE pt.project_id = '' ORDER BY boqg.position,boqg.display_order,pt.task_code

2024-07-29 16:00:49.622333
SELECT id, description  FROM 0_project_sites WHERE project_id = '' ORDER BY description

2024-07-29 16:00:50.818220
SELECT COUNT(*) FROM 0_stock_master WHERE mb_flag!='D'

2024-07-29 16:00:50.920269
SELECT COUNT(*) FROM 0_movement_types

2024-07-29 16:00:50.921699
SELECT l.loc_code, l.location_name, l.inactive
                FROM 0_locations l 
                    LEFT JOIN 0_locations pl ON 
                            l.loc_code = pl.reservation_loc_code 
                WHERE pl.loc_code IS NULL ORDER BY l.location_name

2024-07-29 16:00:50.923438
SELECT project_id, project_code, value_name, description, project_name  
            FROM 0_projects_master pm 
                    INNER JOIN 0_user_data_access_groups udag ON
                            pm.dag_id = udag.dag_id  
                    LEFT JOIN 0_list_values lv ON 
                            pm.department_id = lv.id 
            WHERE pm.inactive = 0 AND udag.user_id =211 AND (pm.project_id='') ORDER BY value_name,pm.description

2024-07-29 16:00:50.924946
SELECT description FROM 0_projects_master WHERE project_id=''

2024-07-29 16:00:50.926152
SELECT  ap.* 
                FROM 0_project_approval_paths pap, 
                        0_approval_path ap 
                WHERE pap.approval_path_id = ap.approval_path_id AND 
                        pap.project_id = '' AND 
                        pap.approval_path_type = 'PR'

2024-07-29 16:00:50.927495
SELECT next_reference FROM 0_sys_types WHERE type_id = '63'

2024-07-29 16:00:50.929692
SELECT real_name FROM 0_users WHERE id ='211'

2024-07-29 16:00:50.930949
SELECT p.*,
                    dn.value_name department_name,
                    dm.name customer_name,
                    u.real_name project_manger_name 
        	FROM 0_projects_master p 
                INNER JOIN 0_list_values dn ON 
                        p.department_id = dn.id 
                LEFT JOIN 0_debtors_master dm ON 
                        p.customer_id = dm.debtor_no 
                LEFT JOIN 0_users u ON 
                        p.project_manager_id = u.id
            WHERE p.project_id =''

2024-07-29 16:00:50.932757
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:00:50.934607
SELECT stock_id, s.description, c.description, s.inactive, s.editable
			FROM 0_stock_master s,0_stock_category c WHERE s.category_id=c.category_id AND s.inactive = 0 AND (stock_id='') ORDER BY c.description,stock_id

2024-07-29 16:00:51.32597
SELECT sm.*, material_cost + labour_cost + overhead_cost AS standard_cost, u.decimals, u.name unit_name 
		FROM 0_stock_master sm,0_item_units u
		WHERE stock_id = '' AND 
                sm.units = u.abbr

2024-07-29 16:00:51.44844
SELECT au.alternate_unit, iu.name 
                FROM 0_alternate_units au,
                        0_item_units iu  
                WHERE au.alternate_unit = iu.abbr AND 
                        au.stock_id = '' AND au.inactive = 0 ORDER BY name

2024-07-29 16:00:51.54654
SELECT pt.task_id, pt.task_code, boqg.description, pt.description, pt.budget, pt.budget_used, pt.budget_allocated  
            FROM 0_project_tasks pt 
                    LEFT JOIN 0_project_task_groups ptg ON 
                        pt.task_group_id = ptg.id 
                    LEFT JOIN 0_project_boq_item_groups boqg ON 
                        ptg.boq_group_id = boqg.id 
            WHERE pt.project_id = '' ORDER BY boqg.position,boqg.display_order,pt.task_code

2024-07-29 16:00:51.72712
SELECT id, description  FROM 0_project_sites WHERE project_id = '' ORDER BY description

2024-07-29 16:00:56.921683
SELECT COUNT(*) FROM 0_stock_master WHERE mb_flag!='D'

2024-07-29 16:00:56.930885
SELECT COUNT(*) FROM 0_movement_types

2024-07-29 16:00:56.932899
SELECT l.loc_code, l.location_name, l.inactive
                FROM 0_locations l 
                    LEFT JOIN 0_locations pl ON 
                            l.loc_code = pl.reservation_loc_code 
                WHERE pl.loc_code IS NULL ORDER BY l.location_name

2024-07-29 16:00:56.946024
SELECT project_id, project_code, value_name, description, project_name  
            FROM 0_projects_master pm 
                    INNER JOIN 0_user_data_access_groups udag ON
                            pm.dag_id = udag.dag_id  
                    LEFT JOIN 0_list_values lv ON 
                            pm.department_id = lv.id 
            WHERE pm.inactive = 0 AND udag.user_id =211 AND (pm.project_id='') ORDER BY value_name,pm.description

2024-07-29 16:00:56.949365
SELECT description FROM 0_projects_master WHERE project_id=''

2024-07-29 16:00:56.954224
SELECT  ap.* 
                FROM 0_project_approval_paths pap, 
                        0_approval_path ap 
                WHERE pap.approval_path_id = ap.approval_path_id AND 
                        pap.project_id = '' AND 
                        pap.approval_path_type = 'PR'

2024-07-29 16:00:56.964039
SELECT next_reference FROM 0_sys_types WHERE type_id = '63'

2024-07-29 16:00:56.968664
SELECT real_name FROM 0_users WHERE id ='211'

2024-07-29 16:00:56.970710
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:00:56.972833
SELECT stock_id, s.description, c.description, s.inactive, s.editable
			FROM 0_stock_master s,0_stock_category c WHERE s.category_id=c.category_id AND s.inactive = 0 AND (stock_id='') ORDER BY c.description,stock_id

2024-07-29 16:00:56.974398
SELECT sm.*, material_cost + labour_cost + overhead_cost AS standard_cost, u.decimals, u.name unit_name 
		FROM 0_stock_master sm,0_item_units u
		WHERE stock_id = '' AND 
                sm.units = u.abbr

2024-07-29 16:00:56.976112
SELECT au.alternate_unit, iu.name 
                FROM 0_alternate_units au,
                        0_item_units iu  
                WHERE au.alternate_unit = iu.abbr AND 
                        au.stock_id = '' AND au.inactive = 0 ORDER BY name

2024-07-29 16:00:56.978934
SELECT pt.task_id, pt.task_code, boqg.description, pt.description, pt.budget, pt.budget_used, pt.budget_allocated  
            FROM 0_project_tasks pt 
                    LEFT JOIN 0_project_task_groups ptg ON 
                        pt.task_group_id = ptg.id 
                    LEFT JOIN 0_project_boq_item_groups boqg ON 
                        ptg.boq_group_id = boqg.id 
            WHERE pt.project_id = '' ORDER BY boqg.position,boqg.display_order,pt.task_code

2024-07-29 16:00:56.981117
SELECT id, description  FROM 0_project_sites WHERE project_id = '' ORDER BY description

2024-07-29 16:01:01.725731
SELECT COUNT(*) FROM 0_stock_master WHERE mb_flag!='D'

2024-07-29 16:01:01.729222
SELECT COUNT(*) FROM 0_movement_types

2024-07-29 16:01:01.730771
SELECT l.loc_code, l.location_name, l.inactive
                FROM 0_locations l 
                    LEFT JOIN 0_locations pl ON 
                            l.loc_code = pl.reservation_loc_code 
                WHERE pl.loc_code IS NULL ORDER BY l.location_name

2024-07-29 16:01:01.732701
SELECT project_id, project_code, value_name, description, project_name  
            FROM 0_projects_master pm 
                    INNER JOIN 0_user_data_access_groups udag ON
                            pm.dag_id = udag.dag_id  
                    LEFT JOIN 0_list_values lv ON 
                            pm.department_id = lv.id 
            WHERE pm.inactive = 0 AND udag.user_id =211 AND ((project_id LIKE '%32%' OR description LIKE '%32%' OR value_name LIKE '%32%')) ORDER BY value_name,pm.description

2024-07-29 16:01:01.734647
SELECT description FROM 0_projects_master WHERE project_id='32'

2024-07-29 16:01:01.736038
SELECT  ap.* 
                FROM 0_project_approval_paths pap, 
                        0_approval_path ap 
                WHERE pap.approval_path_id = ap.approval_path_id AND 
                        pap.project_id = '32' AND 
                        pap.approval_path_type = 'PR'

2024-07-29 16:01:01.740042
SELECT next_reference FROM 0_sys_types WHERE type_id = '63'

2024-07-29 16:01:01.780460
SELECT real_name FROM 0_users WHERE id ='211'

2024-07-29 16:01:01.782143
SELECT p.*,
                    dn.value_name department_name,
                    dm.name customer_name,
                    u.real_name project_manger_name 
        	FROM 0_projects_master p 
                INNER JOIN 0_list_values dn ON 
                        p.department_id = dn.id 
                LEFT JOIN 0_debtors_master dm ON 
                        p.customer_id = dm.debtor_no 
                LEFT JOIN 0_users u ON 
                        p.project_manager_id = u.id
            WHERE p.project_id ='32'

2024-07-29 16:01:01.785906
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:01:01.787870
SELECT stock_id, s.description, c.description, s.inactive, s.editable
			FROM 0_stock_master s,0_stock_category c WHERE s.category_id=c.category_id AND s.inactive = 0 AND (stock_id='') ORDER BY c.description,stock_id

2024-07-29 16:01:01.789335
SELECT sm.*, material_cost + labour_cost + overhead_cost AS standard_cost, u.decimals, u.name unit_name 
		FROM 0_stock_master sm,0_item_units u
		WHERE stock_id = '' AND 
                sm.units = u.abbr

2024-07-29 16:01:01.813189
SELECT au.alternate_unit, iu.name 
                FROM 0_alternate_units au,
                        0_item_units iu  
                WHERE au.alternate_unit = iu.abbr AND 
                        au.stock_id = '' AND au.inactive = 0 ORDER BY name

2024-07-29 16:01:01.818260
SELECT pt.task_id, pt.task_code, boqg.description, pt.description, pt.budget, pt.budget_used, pt.budget_allocated  
            FROM 0_project_tasks pt 
                    LEFT JOIN 0_project_task_groups ptg ON 
                        pt.task_group_id = ptg.id 
                    LEFT JOIN 0_project_boq_item_groups boqg ON 
                        ptg.boq_group_id = boqg.id 
            WHERE pt.project_id = '32' ORDER BY boqg.position,boqg.display_order,pt.task_code

2024-07-29 16:01:01.830420
SELECT id, description  FROM 0_project_sites WHERE project_id = '32' ORDER BY description

2024-07-29 16:01:07.797863
SELECT category_id, description, inactive FROM 0_stock_category ORDER BY category_id

2024-07-29 16:01:07.813929
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_1'

2024-07-29 16:01:07.822228
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_1' ORDER BY display_order,value_name

2024-07-29 16:01:07.841310
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_BRANDS'

2024-07-29 16:01:07.843414
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_BRANDS' ORDER BY display_order,value_name

2024-07-29 16:01:07.852326
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_2'

2024-07-29 16:01:07.854334
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_2' ORDER BY display_order,value_name

2024-07-29 16:01:07.870064
SELECT COUNT(*) FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.inactive = 0  )

2024-07-29 16:01:07.874360
SELECT sm.stock_id, 
                            sm.description, sm.mb_flag,
                            itm_cat.value_name AS item_category_name,
                            sm.search_code,
                            sm.part_no,
                            brand.value_name AS brand_name  FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.inactive = 0  ) ORDER BY sm.stock_id LIMIT 0, 10

2024-07-29 16:01:17.341028
SELECT category_id, description, inactive FROM 0_stock_category ORDER BY category_id

2024-07-29 16:01:17.344052
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_1'

2024-07-29 16:01:17.345610
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_1' ORDER BY display_order,value_name

2024-07-29 16:01:17.354902
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_BRANDS'

2024-07-29 16:01:17.356662
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_BRANDS' ORDER BY display_order,value_name

2024-07-29 16:01:17.363567
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_2'

2024-07-29 16:01:17.365219
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_2' ORDER BY display_order,value_name

2024-07-29 16:01:17.373569
SELECT COUNT(*) FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.description LIKE '%tyre%' AND sm.inactive = 0  )

2024-07-29 16:01:17.376537
SELECT sm.stock_id, 
                            sm.description, sm.mb_flag,
                            itm_cat.value_name AS item_category_name,
                            sm.search_code,
                            sm.part_no,
                            brand.value_name AS brand_name  FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.description LIKE '%tyre%' AND sm.inactive = 0  ) ORDER BY sm.stock_id LIMIT 0, 10

2024-07-29 16:01:18.266909
SELECT category_id, description, inactive FROM 0_stock_category ORDER BY category_id

2024-07-29 16:01:18.269837
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_1'

2024-07-29 16:01:18.271220
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_1' ORDER BY display_order,value_name

2024-07-29 16:01:18.280550
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_BRANDS'

2024-07-29 16:01:18.281996
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_BRANDS' ORDER BY display_order,value_name

2024-07-29 16:01:18.288818
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_2'

2024-07-29 16:01:18.290274
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_2' ORDER BY display_order,value_name

2024-07-29 16:01:18.298424
SELECT sm.stock_id, 
                            sm.description, sm.mb_flag,
                            itm_cat.value_name AS item_category_name,
                            sm.search_code,
                            sm.part_no,
                            brand.value_name AS brand_name  FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.description LIKE '%tyre%' AND sm.inactive = 0  ) ORDER BY sm.stock_id LIMIT 0, 10

2024-07-29 16:01:18.813373
SELECT category_id, description, inactive FROM 0_stock_category ORDER BY category_id

2024-07-29 16:01:18.816132
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_1'

2024-07-29 16:01:18.817698
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_1' ORDER BY display_order,value_name

2024-07-29 16:01:18.826999
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_BRANDS'

2024-07-29 16:01:18.828665
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_BRANDS' ORDER BY display_order,value_name

2024-07-29 16:01:18.835625
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_2'

2024-07-29 16:01:18.836908
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_2' ORDER BY display_order,value_name

2024-07-29 16:01:18.845088
SELECT sm.stock_id, 
                            sm.description, sm.mb_flag,
                            itm_cat.value_name AS item_category_name,
                            sm.search_code,
                            sm.part_no,
                            brand.value_name AS brand_name  FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.description LIKE '%tyre%' AND sm.inactive = 0  ) ORDER BY sm.stock_id LIMIT 0, 10

2024-07-29 16:01:18.970859
SELECT category_id, description, inactive FROM 0_stock_category ORDER BY category_id

2024-07-29 16:01:18.973568
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_1'

2024-07-29 16:01:18.975062
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_1' ORDER BY display_order,value_name

2024-07-29 16:01:18.984115
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_BRANDS'

2024-07-29 16:01:18.985685
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_BRANDS' ORDER BY display_order,value_name

2024-07-29 16:01:18.992795
SELECT * FROM 0_lists  
		WHERE 
              list_code= 'ITEM_PARAMETER_2'

2024-07-29 16:01:18.994276
SELECT id, value_name, list_code, value_code,  value_description  FROM 0_list_values WHERE inactive = 0 AND list_code = 'ITEM_PARAMETER_2' ORDER BY display_order,value_name

2024-07-29 16:01:19.2334
SELECT sm.stock_id, 
                            sm.description, sm.mb_flag,
                            itm_cat.value_name AS item_category_name,
                            sm.search_code,
                            sm.part_no,
                            brand.value_name AS brand_name  FROM 0_stock_master sm 
                            LEFT JOIN 0_list_values  itm_cat ON 
                                    sm.parameter1_id = itm_cat.id 
                            LEFT JOIN 0_list_values brand ON 
                                    sm.brand = brand.id 
                            LEFT JOIN 0_list_values type ON 
                                    sm.parameter2_id = type.id 
                         WHERE (1 = 1  AND sm.description LIKE '%tyre%' AND sm.inactive = 0  ) ORDER BY sm.stock_id LIMIT 0, 10

