
set names utf8

SELECT
                *
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'index'
         AND `Visible` = 1 LIMIT 1

SELECT
                `Language`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Visible` = 1 AND
                `Language` != 'bg' AND
                `ID` = 1

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `ID`,
	        	`Title`,
	        	`MenuLabel`,
                `URLLabel`,
                `SubTitle`,
	        	`Annotation`,
                `Icon`,
                `Visible`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
                `FirstPage` = 1
         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `Title`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/reviews/%'
         AND `Visible` = 1 LIMIT 1

SELECT COUNT(`ID`) FROM `reviews` WHERE `FirstPage` = 0 AND `Visible` = 1

SELECT
	        	*
	        FROM
	        	`reviews`
	    	WHERE
                `Language` = 'bg'
         AND `Visible` = 1 ORDER BY `PostDate` DESC

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `MainNav` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 3 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

set names utf8

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/rules/%'
         AND `Visible` = 1 LIMIT 1

set names utf8

SELECT
                *
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'index'
         AND `Visible` = 1 LIMIT 1

SELECT
                `Language`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Visible` = 1 AND
                `Language` != 'bg' AND
                `ID` = 1

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `ID`,
	        	`Title`,
	        	`MenuLabel`,
                `URLLabel`,
                `SubTitle`,
	        	`Annotation`,
                `Icon`,
                `Visible`
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
                `FirstPage` = 1
         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `Title`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/reviews/%'
         AND `Visible` = 1 LIMIT 1

SELECT COUNT(`ID`) FROM `reviews` WHERE `FirstPage` = 0 AND `Visible` = 1

SELECT
	        	*
	        FROM
	        	`reviews`
	    	WHERE
                `Language` = 'bg'
         AND `Visible` = 1 ORDER BY `PostDate` DESC

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `MainNav` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 3 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

set names utf8

SELECT
                *
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'cmr'
         AND `Visible` = 1 LIMIT 1

SELECT
                `Language`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Visible` = 1 AND
                `Language` != 'bg' AND
                `ID` = 17

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `MainNav` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 3 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

set names utf8

SELECT
                *
	        FROM
	        	`pages`
	    	WHERE
                `Language` = 'bg' AND
	    		`URLLabel` = 'cmr'
         AND `Visible` = 1 LIMIT 1

SELECT
                `Language`,
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Visible` = 1 AND
                `Language` != 'bg' AND
                `ID` = 17

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `AddOn` LIKE '%/contacts/%'
         AND `Visible` = 1 LIMIT 1

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `MainNav` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 0 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC

SELECT
                `MenuLabel`,
                `SubTitle`,
                `URLLabel`,
                `AddOn`
            FROM
                `pages`
            WHERE
                `Language` = 'bg' AND
                `ParentID` = 3 AND
                `Footer` = 1

         AND `Visible` = 1 ORDER BY `PostDate` ASC
