src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php
protected function GetQuery($sChildCategoryId)
    {
        $sSelect = "SELECT `shop_category`.*
                    FROM `shop_category`
                   WHERE `shop_category`.`shop_category_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
      OR `shop_category`.`id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
                ORDER BY `shop_category`.`position`";

        return $sSelect;
    }
protected function GetQuery($sChildCategoryId)
    {
        $sSelect = "SELECT `shop_category`.*
                    FROM `shop_category`
                   WHERE `shop_category`.`shop_category_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
      OR `shop_category`.`id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
                ORDER BY `shop_category`.`position`";

        return $sSelect;
    }
protected function GetQuery ( $ sChildCategoryId ) { $ sSelect = "SELECT `shop_category`.*
                    FROM `shop_category`
                   WHERE `shop_category`.`shop_category_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sChildCategoryId ) . "'
      OR `shop_category`.`id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sChildCategoryId ) . "'
                ORDER BY `shop_category`.`position`" ; return $ sSelect ; }
Returns query to get all child categories for given category id.
If given category id is empty then returns query to get master categories.

@param  $sChildCategoryId

@return string
Returns query to get all child categories for given category id . If given category id is empty then returns query to get master categories .