# [20-Mar-2024 15:14:21] /micromax/www/bg/продукти/кръгли-и-плоски-ремъци-транспортни-ленти-habasit/плоски-силови-ремъци.html 108.61.209.243

set names utf8

SELECT
                `Module`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'продукти' AND
                `Action` = 'index'
                -- `ParentID` = 1 AND // TODO: FULL TEST
                -- (`Action` IS NULL OR `Action` = '')
         AND `Visible` = 1 LIMIT 1

SELECT
                `products`.*,
                `Parent`.`Title` AS `ParentTitle`,
                `Parent`.`URLLabel` AS `ParentURLLabel`
            FROM
                `products`
                INNER JOIN `products` AS `Parent` ON
                    `products`.`ParentID` = `Parent`.`ID` AND
                    `products`.`Language` = `Parent`.`Language` AND
                    `Parent`.`URLLabel` = 'кръгли-и-плоски-ремъци-транспортни-ленти-habasit'
            WHERE
                `products`.`Language` = 'bg' AND
                `products`.`URLLabel` = 'плоски-силови-ремъци'
         AND `products`.`Visible` = 1 LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LHome') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT `MenuLabel`, `FooterLabel`, `Title` FROM `pages` WHERE `ParentID` = 1 AND
	`Module` = 'products' AND
	`URLLabel` = 'продукти' AND
	`Action` = 'index' AND
	`Language` = 'bg' AND
	`Visible` = 1 LIMIT 1

SELECT
                P1.`URLLabel`
	        FROM
	        	`pages` P1
                INNER JOIN `pages` P2 ON
                    P1.`ID` = P2.`ID` AND
                    P2.`Language` = 'bg' AND
                    P2.`URLLabel` = 'продукти'
	    	WHERE
                P1.`Language` = 'bg'
         AND P1.`Visible` = 1 LIMIT 1

SELECT
                P1.`URLLabel`
	        FROM
	        	`pages` P1
                INNER JOIN `pages` P2 ON
                    P1.`ID` = P2.`ID` AND
                    P2.`Language` = 'bg' AND
                    P2.`URLLabel` = 'продукти'
	    	WHERE
                P1.`Language` = 'en'
         AND P1.`Visible` = 1 LIMIT 1

SELECT
                `Module`,
                `Action`,
                `MenuLabel`,
                `FooterLabel`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Module` != 'users' AND
                (`MenuLabel` <> '' OR `FooterLabel` <> '') AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY `PostDate` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LCookiePolicy','LPrivacyPolicy') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LKeywords') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('LContactUsNow') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
