- FROM ".TB_PREF."stock_master,
- ".TB_PREF."stock_category,
- ".TB_PREF."sales_types,
- ".TB_PREF."prices
- WHERE ".TB_PREF."stock_master.stock_id=".TB_PREF."prices.stock_id
- AND ".TB_PREF."prices.sales_type_id=".TB_PREF."sales_types.id
- AND ".TB_PREF."stock_master.category_id=".TB_PREF."stock_category.category_id";
- if ($salestype != null)
- $sql .= " AND ".TB_PREF."sales_types.id = '$salestype'";
- if ($category != null)
+ FROM ".TB_PREF."stock_master,
+ ".TB_PREF."stock_category
+ WHERE ".TB_PREF."stock_master.category_id=".TB_PREF."stock_category.category_id";
+ if ($category != 0)