
set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                    `ID`,
                    `MetaTitle`,
                    `MetaDescription`,
                    `MetaKeywords`,
                    `MetaImage`
                FROM
                    `nav`
                WHERE
                    `Language` = 'bg' AND
                    (`URLLabel` IS NULL OR `URLLabel` = '')
                LIMIT 1

SELECT
                *
            FROM
                `slider`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC
            LIMIT 6

SELECT
                `ID`,
                `PostDate`,
                `Title`,
                `URLLabel`,
                `Annotation`,
                `FilePath`,
                `Visible`
	        FROM
	        	`events`
	    	WHERE
                `Language` = 'bg' AND
                `OnFirstPage` = 1
         AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 4

SELECT `CharCode` FROM `currencies`  WHERE `Visible` = 1

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = ''

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

set names utf8

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 LIMIT 1

set names utf8

SELECT
                `parts`.`ID`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                `parts`.`Visible`
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
                INNER JOIN `part-groups` ON `parts`.`ID` = `part-groups`.`PartID`
                INNER JOIN `groups` AS `SubGroup` ON `SubGroup`.`ID` = `part-groups`.`GroupID` AND `SubGroup`.`Language` = 'bg'
                LEFT JOIN `groups` AS `ParentGroup` ON `ParentGroup`.`ID` = `SubGroup`.`ParentID` AND `ParentGroup`.`Language` = 'bg'
            WHERE
                `parts`.`IsNew` = 1 AND
                `parts`.`Visible` = 1 AND
                `parts`.`PostDate` > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND /* TODO 12 -> 1 */
                `part-texts`.`Language` = 'bg'
            GROUP BY `parts`.`ID`
         ORDER BY RAND() LIMIT 8

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT `CharCode` FROM `currencies`  WHERE `Visible` = 1

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g0$t1751265383$j60$l0$h0","_ga":"GA1.2.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","_gat_gtag_UA_36979575_1":"1"}'

set names utf8

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 LIMIT 1

set names utf8

SELECT `ID`, `UserKey` FROM `users` WHERE `UserKey` LIKE 'w5vClsOAwpXDqcKnw4HCncK3w5fCsMOLw5zCu8KTw5rCpcKx%' LIMIT 1

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                    `ID`,
                    `MetaTitle`,
                    `MetaDescription`,
                    `MetaKeywords`,
                    `MetaImage`
                FROM
                    `nav`
                WHERE
                    `Language` = 'bg' AND
                    (`URLLabel` IS NULL OR `URLLabel` = '')
                LIMIT 1

SELECT
                *
            FROM
                `slider`
            WHERE
                (CURDATE() BETWEEN `StartFrom` AND `EndTo` OR `EndTo` IS NULL) AND
                `Language` = 'bg' AND
                `Visible` = 1
            ORDER BY
                `PostDate` DESC
            LIMIT 6

SELECT
                `ID`,
                `PostDate`,
                `Title`,
                `URLLabel`,
                `Annotation`,
                `FilePath`,
                `Visible`
	        FROM
	        	`events`
	    	WHERE
                `Language` = 'bg' AND
                `OnFirstPage` = 1
         AND `Visible` = 1 ORDER BY `PostDate` DESC LIMIT 4

SELECT `CharCode` FROM `currencies`  WHERE `Visible` = 1

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"-mg:u-":"Wkd4a1pn","_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g1$t1751265425$j18$l0$h0","_ga":"GA1.2.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","_gat_gtag_UA_36979575_1":"1","PHPSESSID":"tgrajm37hanfoas762388tnf5d"}'

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `Num` FROM `basket` WHERE `UserID` = 33

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                `parts`.`ID`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                `parts`.`Visible`
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
                INNER JOIN `part-groups` ON `parts`.`ID` = `part-groups`.`PartID`
                INNER JOIN `groups` AS `SubGroup` ON `SubGroup`.`ID` = `part-groups`.`GroupID` AND `SubGroup`.`Language` = 'bg'
                LEFT JOIN `groups` AS `ParentGroup` ON `ParentGroup`.`ID` = `SubGroup`.`ParentID` AND `ParentGroup`.`Language` = 'bg'
            WHERE
                `parts`.`IsNew` = 1 AND
                `parts`.`Visible` = 1 AND
                `parts`.`PostDate` > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND /* TODO 12 -> 1 */
                `part-texts`.`Language` = 'bg'
            GROUP BY `parts`.`ID`
         ORDER BY RAND() LIMIT 8

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 33

SELECT
                *
            FROM
                `orders`
            WHERE
                `Status` > 0 AND
                `UserID` = 33
            ORDER BY
                `PostDate` DESC
            LIMIT 100

SELECT `CharCode` FROM `currencies`

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"-mg:u-":"Wkd4a1pn","-mg:cp-":"1","_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g1$t1751265434$j9$l0$h0","_ga":"GA1.2.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","_gat_gtag_UA_36979575_1":"1","PHPSESSID":"tgrajm37hanfoas762388tnf5d"}'

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `Num` FROM `basket` WHERE `UserID` = 33

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                *
            FROM
                `users`
            WHERE 1
         LIMIT 0, 30

SELECT COUNT(*) AS NumRows FROM (SELECT
                *
            FROM
                `users`
            WHERE 1
        ) AS CountTable

SELECT `CharCode` FROM `currencies`

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"-mg:u-":"Wkd4a1pn","-mg:cp-":"1","_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g1$t1751265437$j6$l0$h0","_ga":"GA1.1.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","PHPSESSID":"tgrajm37hanfoas762388tnf5d"}'

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `Num` FROM `basket` WHERE `UserID` = 33

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                *
            FROM
                `users`
            WHERE 1
         AND `SearchKey` LIKE '%w5nCjMKDwqnDkcKLw%' LIMIT 0, 30

SELECT COUNT(*) AS NumRows FROM (SELECT
                *
            FROM
                `users`
            WHERE 1
         AND `SearchKey` LIKE '%w5nCjMKDwqnDkcKLw%') AS CountTable

SELECT `CharCode` FROM `currencies`

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"-mg:u-":"Wkd4a1pn","-mg:cp-":"1","_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g1$t1751265445$j60$l0$h0","_ga":"GA1.2.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","PHPSESSID":"tgrajm37hanfoas762388tnf5d","_gat_gtag_UA_36979575_1":"1"}'

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `Num` FROM `basket` WHERE `UserID` = 33

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 3 LIMIT 1

SELECT
                `ListName`
            FROM
                `pricelist`
            WHERE
                `ID` = 711
            LIMIT 1

SELECT `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 3

SELECT
                *
            FROM
                `orders`
            WHERE
                `Status` > 0 AND
                `UserID` = 3
            ORDER BY
                `PostDate` DESC
            LIMIT 100

SELECT `CharCode` FROM `currencies`

SELECT
                *
	        FROM
	        	`rollingnews`
	    	WHERE
                (CURDATE() BETWEEN FromDate AND ToDate OR ToDate = '0000-00-00') AND
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`PostDate` DESC
            LIMIT 4

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
                `ID`,
	        	`MenuLabel`,
	        	`URLLabel`
	        FROM
	        	`nav`
	    	WHERE
                `Language` = 'bg' AND
	    		`Visible` = 1
            ORDER BY
            	`ItemPosition` ASC

SELECT
                `groups`.`ID`,
                `groups`.`ParentID`,
	        	`groups`.`MenuLabel`,
	        	`groups`.`URLLabel`,
                `groups`.`PartsLabel`,
                `SubGroups`.`ID` AS `SubGroupID`,
                `groups`.`Visible`
	        FROM
	        	`groups`
                LEFT JOIN `groups` AS `SubGroups` ON `groups`.`ID` = `SubGroups`.`ParentID`
	    	WHERE
                `groups`.`Language` = 'bg' AND
	    		`groups`.`Visible` = 1
            GROUP BY
                `groups`.`ID`
            ORDER BY
                `groups`.`ParentID` ASC,
            	`groups`.`ItemPosition` ASC,
                `groups`.`MenuLabel` ASC

SELECT
	        	`pages`.`MenuLabel`,
	        	`pages`.`URLLabel`,
                `pages`.`Visible`
	        FROM
	        	`pages`
	    	WHERE
                `pages`.`Language` = 'bg' AND
	    		`pages`.`Visible` = 1 AND
                `pages`.`InFooter` = 1
            ORDER BY
            	`pages`.`ItemPosition` ASC,
                `pages`.`MenuLabel` ASC

DELETE FROM `log` WHERE `PostDate` < NOW() - INTERVAL 1 MINUTE

INSERT INTO `log` (`IP`, `PostDate`, `Num`, `Agent`)
            VALUES ('84.54.188.51', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0')
            ON DUPLICATE KEY UPDATE
                `Num` = IF(`PostDate` >= NOW() - INTERVAL 1 MINUTE, `Num` + 1, 1),
                `PostDate` = IF(`PostDate` < NOW() - INTERVAL 1 MINUTE, NOW(), `PostDate`),
                `Agent` = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0',
                `Cookie` = '{"-mg:u-":"Wkd4a1pn","-mg:cp-":"1","_ga_M9CT0S3L0L":"GS2.1.s1751265383$o1$g1$t1751265448$j57$l0$h0","_ga":"GA1.2.935943968.1751265384","_gid":"GA1.2.1454403351.1751265384","PHPSESSID":"tgrajm37hanfoas762388tnf5d","_gat_gtag_UA_36979575_1":"1"}'

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT * FROM `users` WHERE `ID` = 33 LIMIT 1

SELECT `Num` FROM `basket` WHERE `UserID` = 33

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '84.54.188.51' AND `Num` > 1 AND `Cookie` IS NULL

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                `UserKey`
            FROM
                `users`
            WHERE
                `ID` = 3
            LIMIT 1

SELECT `PriceListID` FROM `users` WHERE `ID` = 3 LIMIT 1

SELECT `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 3

SELECT
                    `parts`.`RefNumber`,
                    `groups`.`MenuLabel` AS `GroupName`,
                    `prices`.`Price`,
                    `parts`.`PriceGroup`,
                    `parts`.`Visible`,
                    SUM(`availabilities`.`Quantity`) AS `Quantity`
                FROM
                    `parts`
                    INNER JOIN `part-groups` ON `part-groups`.`PartID` = `parts`.`ID`
                    INNER JOIN `groups` ON `groups`.`ID` = `part-groups`.`GroupID`
                    LEFT JOIN `availabilities` ON `availabilities`.`RefNumber` = `parts`.`RefNumber`
                    LEFT JOIN `prices` ON
                        `prices`.`RefNumber` = `parts`.`RefNumber` AND
                        `prices`.`PriceListID` =711
                WHERE
                    `groups`.`Language` = 'bg'
                GROUP BY
                    `parts`.`RefNumber`
                ORDER BY
                    `parts`.`RefNumber` ASC
