
set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '46.10.210.42' 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743664691.18.1.1743665030.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691"}'

set names utf8

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

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` = '46.10.210.42' 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.0.1743743235.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","_gat_gtag_UA_36979575_1":"1"}'

set names utf8

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

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '46.10.210.42' 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743236.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","_gat_gtag_UA_36979575_1":"1","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

set names utf8

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

set names utf8

set names utf8

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

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

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

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

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '46.10.210.42' 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743239.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","_gat_gtag_UA_36979575_1":"1","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743240.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","_gat_gtag_UA_36979575_1":"1","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743242.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743332.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743364.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743379.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
	        	`pricelist`
         ORDER BY `ListName` ASC LIMIT 0, 30

SELECT COUNT(*) AS NumRows FROM (SELECT
                *
	        FROM
	        	`pricelist`
         ORDER BY `ListName` ASC) 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743394.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                    `groups`
                WHERE
                    `URLLabel` = 'starters' AND
                    `Language` = 'bg' AND
                    `Visible` = 1
                LIMIT 1

SELECT
                `parts`.`ID`,
                `parts`.`PostDate`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                CHAR_LENGTH(`parts`.`Gallery`) AS `IsGallery`,
                `parts`.`IsPromo`,
                `parts`.`IsNew`,
                `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
                (`SubGroup`.`ID` = 1 OR `ParentGroup`.`ID` = 1) AND
                `part-texts`.`Language` = 'bg'
                
            GROUP BY
                `parts`.`ID`
            ORDER BY
                `IsGallery` DESC,
                `parts`.IsPromo ASC,
                `ParentGroup`.`URLLabel` ASC,
                `parts`.RefNumber ASC
         LIMIT 0, 12

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `parts`.`ID`,
                `parts`.`PostDate`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                CHAR_LENGTH(`parts`.`Gallery`) AS `IsGallery`,
                `parts`.`IsPromo`,
                `parts`.`IsNew`,
                `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
                (`SubGroup`.`ID` = 1 OR `ParentGroup`.`ID` = 1) AND
                `part-texts`.`Language` = 'bg'
                
            GROUP BY
                `parts`.`ID`
            ORDER BY
                `IsGallery` DESC,
                `parts`.IsPromo ASC,
                `ParentGroup`.`URLLabel` ASC,
                `parts`.RefNumber ASC
        ) 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
                `ID`
            FROM
                `groups`
            WHERE
                `URLLabel` = 'starters' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743510.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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 `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 33

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` = '46.10.210.42' 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
                    `groups`
                WHERE
                    `URLLabel` = 'starters' AND
                    `Language` = 'bg' AND
                    `Visible` = 1
                LIMIT 1

SELECT
                `parts`.*,
                `part-texts`.*,
                IF(`ParentGroup`.`URLLabel` IS NULL, `SubGroup`.`URLLabel`, '') AS `ParentGroupUrlLabel`
            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`.`ID` = 1852 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

SELECT GROUP_CONCAT(`BrandNumber` SEPARATOR ', ') AS `Numbers`
            FROM (
                SELECT
                    `part-brands`.`BrandNumber`
                FROM
                    `users`
                    INNER JOIN `part-brands` ON `users`.`Brand` = `part-brands`.`Brand`
                    INNER JOIN `parts` ON `parts`.`RefNumber` = `part-brands`.`RefNumber`
                WHERE
                    `parts`.`ID` = 1852 AND
                    `users`.`ID` = 33
                LIMIT 3
            ) AS `Result`;

SELECT
                GROUP_CONCAT(`groups`.`MenuLabel` SEPARATOR ', ') AS `Groups`
            FROM
                `groups`
                INNER JOIN `part-groups` ON `part-groups`.`GroupID` = `groups`.`ID`
                INNER JOIN `parts` ON `parts`.`ID` = `part-groups`.`PartID`
            WHERE
                `parts`.`ID` = 1852 AND
                `groups`.`Language` = 'bg'
            GROUP BY
                `parts`.`ID`

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` < 1000 AND
                `PartID` = 1852 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` > 1000 AND
                `PartID` = 1852 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT DISTINCT
                    `parts`.`RefNumber`,
                    `brands`.`ID`,
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`,
                    `part-brands`.`BrandNumberSearch`,
                    `applications`.`BrandNumberSearch` AS `OrgNumber`,
                    `brands`.`PartVisible`
                FROM
                    `part-brands`
                    INNER JOIN `brands` ON `part-brands`.`Brand` = `brands`.`Title`
                    INNER JOIN `parts` ON `part-brands`.`RefNumber` = `parts`.`RefNumber`
                    LEFT JOIN `applications` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
                WHERE
                    `parts`.`ID` = 1852 
                ORDER BY
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`

SELECT DISTINCT
                `parts`.`RefNumber`,
                `brands`.`ID`,
                 UPPER(`applications`.`Brand`) AS `Title`,
                `applications`.`BrandNumber`,
                `applications`.`BrandNumberSearch`,
                `part-brands`.`BrandNumberSearch` AS `PartsNumber`,
                `brands`.`PartVisible`
            FROM
                `applications`
                INNER JOIN `brands` ON `applications`.`Brand` = `brands`.`Title`
                INNER JOIN `parts` ON `applications`.`RefNumber` = `parts`.`RefNumber`
                LEFT JOIN `part-brands` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
            WHERE
                `parts`.`ID` = 1852 
            GROUP BY
                `applications`.`BrandNumber`
            ORDER BY
                `applications`.`Brand`,
                `applications`.`BrandNumber`

SELECT DISTINCT
                `Marque`,
                `ModelName`,
                `ModelType`,
                `Carburant`,
                `Engine`,
                `DateDebut`,
                `DateFin`,
                `TypeID`
            FROM
                `vehicles`
                INNER JOIN `parts` ON `vehicles`.`RefNumber` = `parts`.`RefNumber`
            WHERE
                `parts`.`ID` = 1852
            ORDER BY
                `Marque`, `ModelName`

SELECT
                `equivalents`.*,
                `parts`.`ID` AS `PartID`,
                `part-texts`.`URLLabel` AS `PartURLLabel`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`
            FROM
                `equivalents`
                INNER JOIN `parts` ON `equivalents`.`EquivalentNumber` = `parts`.`RefNumber`
                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
                `part-texts`.`Language` = 'bg' AND
                `equivalents`.`Language` = 'bg' AND
                `equivalents`.`RefNumber` = 'IR8003'
            GROUP BY `parts`.`ID`

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
                `ID`
            FROM
                `groups`
            WHERE
                `URLLabel` = 'starters' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743518.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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 `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 33

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` = '46.10.210.42' 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 `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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743643.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743644.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743683.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                    `groups`
                WHERE
                    `URLLabel` = 'starters' AND
                    `Language` = 'bg' AND
                    `Visible` = 1
                LIMIT 1

SELECT
                `parts`.`ID`,
                `parts`.`PostDate`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                CHAR_LENGTH(`parts`.`Gallery`) AS `IsGallery`,
                `parts`.`IsPromo`,
                `parts`.`IsNew`,
                `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
                (`SubGroup`.`ID` = 1 OR `ParentGroup`.`ID` = 1) AND
                `part-texts`.`Language` = 'bg'
                
            GROUP BY
                `parts`.`ID`
            ORDER BY
                `IsGallery` DESC,
                `parts`.IsPromo ASC,
                `ParentGroup`.`URLLabel` ASC,
                `parts`.RefNumber ASC
         LIMIT 0, 12

SELECT COUNT(*) AS NumRows FROM (
            SELECT
                `parts`.`ID`,
                `parts`.`PostDate`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                CHAR_LENGTH(`parts`.`Gallery`) AS `IsGallery`,
                `parts`.`IsPromo`,
                `parts`.`IsNew`,
                `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
                (`SubGroup`.`ID` = 1 OR `ParentGroup`.`ID` = 1) AND
                `part-texts`.`Language` = 'bg'
                
            GROUP BY
                `parts`.`ID`
            ORDER BY
                `IsGallery` DESC,
                `parts`.IsPromo ASC,
                `ParentGroup`.`URLLabel` ASC,
                `parts`.RefNumber ASC
        ) 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
                `ID`
            FROM
                `groups`
            WHERE
                `URLLabel` = 'starters' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743692.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

set names utf8

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

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

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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743803.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743805.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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
                            `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
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

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

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

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

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '46.10.210.42' 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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743815.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.1.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743817.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743820.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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` = '46.10.210.42' 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
                `parts`.`ID`,
                `parts`.`RefNumber`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`DeliveryDate`,
                `parts`.`DeliveryQuantity`,
                `parts`.`Supplier`,
                COALESCE(SUM(`availabilities`.`Quantity`), 0) AS `Quantity`,
                `parts`.`DeliveryMinQuantity`
            FROM
                `parts`
                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'
                LEFT JOIN `availabilities` ON `parts`.`RefNumber` = `availabilities`.`RefNumber`
            WHERE
                `parts`.`DeliveryMinQuantity` > 0 AND
                `parts`.`DeliveryDate` > CURDATE()
                
            GROUP BY
                `parts`.`RefNumber`,
                `parts`.`DeliveryDate`,
                `parts`.`Supplier`,
                `parts`.`DeliveryMinQuantity`
            HAVING
                COALESCE(SUM(`availabilities`.`Quantity`), 0) < `parts`.`DeliveryMinQuantity`
            ORDER BY
                `parts`.`DeliveryDate` ASC;

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743828.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e"}'

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` = '46.10.210.42' 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
                    `groups`
                WHERE
                    `URLLabel` = 'starters' AND
                    `Language` = 'bg' AND
                    `Visible` = 1
                LIMIT 1

SELECT
                `parts`.*,
                `part-texts`.*,
                IF(`ParentGroup`.`URLLabel` IS NULL, `SubGroup`.`URLLabel`, '') AS `ParentGroupUrlLabel`
            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`.`ID` = 1854 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

SELECT GROUP_CONCAT(`BrandNumber` SEPARATOR ', ') AS `Numbers`
            FROM (
                SELECT
                    `part-brands`.`BrandNumber`
                FROM
                    `users`
                    INNER JOIN `part-brands` ON `users`.`Brand` = `part-brands`.`Brand`
                    INNER JOIN `parts` ON `parts`.`RefNumber` = `part-brands`.`RefNumber`
                WHERE
                    `parts`.`ID` = 1854 AND
                    `users`.`ID` = 33
                LIMIT 3
            ) AS `Result`;

SELECT
                GROUP_CONCAT(`groups`.`MenuLabel` SEPARATOR ', ') AS `Groups`
            FROM
                `groups`
                INNER JOIN `part-groups` ON `part-groups`.`GroupID` = `groups`.`ID`
                INNER JOIN `parts` ON `parts`.`ID` = `part-groups`.`PartID`
            WHERE
                `parts`.`ID` = 1854 AND
                `groups`.`Language` = 'bg'
            GROUP BY
                `parts`.`ID`

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` < 1000 AND
                `PartID` = 1854 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` > 1000 AND
                `PartID` = 1854 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT DISTINCT
                    `parts`.`RefNumber`,
                    `brands`.`ID`,
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`,
                    `part-brands`.`BrandNumberSearch`,
                    `applications`.`BrandNumberSearch` AS `OrgNumber`,
                    `brands`.`PartVisible`
                FROM
                    `part-brands`
                    INNER JOIN `brands` ON `part-brands`.`Brand` = `brands`.`Title`
                    INNER JOIN `parts` ON `part-brands`.`RefNumber` = `parts`.`RefNumber`
                    LEFT JOIN `applications` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
                WHERE
                    `parts`.`ID` = 1854 
                ORDER BY
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`

SELECT DISTINCT
                `parts`.`RefNumber`,
                `brands`.`ID`,
                 UPPER(`applications`.`Brand`) AS `Title`,
                `applications`.`BrandNumber`,
                `applications`.`BrandNumberSearch`,
                `part-brands`.`BrandNumberSearch` AS `PartsNumber`,
                `brands`.`PartVisible`
            FROM
                `applications`
                INNER JOIN `brands` ON `applications`.`Brand` = `brands`.`Title`
                INNER JOIN `parts` ON `applications`.`RefNumber` = `parts`.`RefNumber`
                LEFT JOIN `part-brands` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
            WHERE
                `parts`.`ID` = 1854 
            GROUP BY
                `applications`.`BrandNumber`
            ORDER BY
                `applications`.`Brand`,
                `applications`.`BrandNumber`

SELECT DISTINCT
                `Marque`,
                `ModelName`,
                `ModelType`,
                `Carburant`,
                `Engine`,
                `DateDebut`,
                `DateFin`,
                `TypeID`
            FROM
                `vehicles`
                INNER JOIN `parts` ON `vehicles`.`RefNumber` = `parts`.`RefNumber`
            WHERE
                `parts`.`ID` = 1854
            ORDER BY
                `Marque`, `ModelName`

SELECT
                `equivalents`.*,
                `parts`.`ID` AS `PartID`,
                `part-texts`.`URLLabel` AS `PartURLLabel`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`
            FROM
                `equivalents`
                INNER JOIN `parts` ON `equivalents`.`EquivalentNumber` = `parts`.`RefNumber`
                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
                `part-texts`.`Language` = 'bg' AND
                `equivalents`.`Language` = 'bg' AND
                `equivalents`.`RefNumber` = 'IR8005'
            GROUP BY `parts`.`ID`

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
                `ID`
            FROM
                `groups`
            WHERE
                `URLLabel` = 'starters' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743900.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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 `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 33

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` = '46.10.210.42' 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
                    `groups`
                WHERE
                    `URLLabel` = 'starters' AND
                    `Language` = 'bg' AND
                    `Visible` = 1
                LIMIT 1

SELECT
                `parts`.*,
                `part-texts`.*,
                IF(`ParentGroup`.`URLLabel` IS NULL, `SubGroup`.`URLLabel`, '') AS `ParentGroupUrlLabel`
            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`.`ID` = 1852 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

SELECT GROUP_CONCAT(`BrandNumber` SEPARATOR ', ') AS `Numbers`
            FROM (
                SELECT
                    `part-brands`.`BrandNumber`
                FROM
                    `users`
                    INNER JOIN `part-brands` ON `users`.`Brand` = `part-brands`.`Brand`
                    INNER JOIN `parts` ON `parts`.`RefNumber` = `part-brands`.`RefNumber`
                WHERE
                    `parts`.`ID` = 1852 AND
                    `users`.`ID` = 33
                LIMIT 3
            ) AS `Result`;

SELECT
                GROUP_CONCAT(`groups`.`MenuLabel` SEPARATOR ', ') AS `Groups`
            FROM
                `groups`
                INNER JOIN `part-groups` ON `part-groups`.`GroupID` = `groups`.`ID`
                INNER JOIN `parts` ON `parts`.`ID` = `part-groups`.`PartID`
            WHERE
                `parts`.`ID` = 1852 AND
                `groups`.`Language` = 'bg'
            GROUP BY
                `parts`.`ID`

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` < 1000 AND
                `PartID` = 1852 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT
                `ParamID`,
                `Parameter`,
                `ParamValue`
            FROM
                `part-params`
                INNER JOIN `params` ON `params`.`ID` = `part-params`.`ParamID`
            WHERE
                `params`.`ID` > 1000 AND
                `PartID` = 1852 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT DISTINCT
                    `parts`.`RefNumber`,
                    `brands`.`ID`,
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`,
                    `part-brands`.`BrandNumberSearch`,
                    `applications`.`BrandNumberSearch` AS `OrgNumber`,
                    `brands`.`PartVisible`
                FROM
                    `part-brands`
                    INNER JOIN `brands` ON `part-brands`.`Brand` = `brands`.`Title`
                    INNER JOIN `parts` ON `part-brands`.`RefNumber` = `parts`.`RefNumber`
                    LEFT JOIN `applications` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
                WHERE
                    `parts`.`ID` = 1852 
                ORDER BY
                    `brands`.`Title`,
                    `part-brands`.`BrandNumber`

SELECT DISTINCT
                `parts`.`RefNumber`,
                `brands`.`ID`,
                 UPPER(`applications`.`Brand`) AS `Title`,
                `applications`.`BrandNumber`,
                `applications`.`BrandNumberSearch`,
                `part-brands`.`BrandNumberSearch` AS `PartsNumber`,
                `brands`.`PartVisible`
            FROM
                `applications`
                INNER JOIN `brands` ON `applications`.`Brand` = `brands`.`Title`
                INNER JOIN `parts` ON `applications`.`RefNumber` = `parts`.`RefNumber`
                LEFT JOIN `part-brands` ON `applications`.`BrandNumberSearch` = `part-brands`.`BrandNumberSearch`
            WHERE
                `parts`.`ID` = 1852 
            GROUP BY
                `applications`.`BrandNumber`
            ORDER BY
                `applications`.`Brand`,
                `applications`.`BrandNumber`

SELECT DISTINCT
                `Marque`,
                `ModelName`,
                `ModelType`,
                `Carburant`,
                `Engine`,
                `DateDebut`,
                `DateFin`,
                `TypeID`
            FROM
                `vehicles`
                INNER JOIN `parts` ON `vehicles`.`RefNumber` = `parts`.`RefNumber`
            WHERE
                `parts`.`ID` = 1852
            ORDER BY
                `Marque`, `ModelName`

SELECT
                `equivalents`.*,
                `parts`.`ID` AS `PartID`,
                `part-texts`.`URLLabel` AS `PartURLLabel`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`
            FROM
                `equivalents`
                INNER JOIN `parts` ON `equivalents`.`EquivalentNumber` = `parts`.`RefNumber`
                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
                `part-texts`.`Language` = 'bg' AND
                `equivalents`.`Language` = 'bg' AND
                `equivalents`.`RefNumber` = 'IR8003'
            GROUP BY `parts`.`ID`

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
                `ID`
            FROM
                `groups`
            WHERE
                `URLLabel` = 'starters' AND
                `Language` = 'bg' AND
                `Visible` = 1
            LIMIT 1

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 ('46.10.210.42', NOW(), 1, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.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:138.0) Gecko/20100101 Firefox/138.0',
                `Cookie` = '{"-mg:cp-":"1","-mg:u-":"YXNLVVltbw","_fbp":"fb.1.1735880576812.658240628693595164","_ga":"GA1.2.631743187.1736175234","_ga_M9CT0S3L0L":"GS1.1.1743743235.19.1.1743743905.0.0.0","_ga_QXYZMLZ1S6":"GS1.1.1739524443.1.0.1739524452.0.0.0","_ga_8MW9SRRFBB":"GS1.1.1743676657.5.1.1743676659.0.0.0","__gfp_64b":"TIh82nP3sV_CefDTb3a0HFkxx49mQ2DbhWKVoY8KIsn..7|1743060916|2|||8:1:21","_gid":"GA1.2.1208510647.1743664691","PHPSESSID":"n1701h9e5a6r69f9ukbr8r4n0e","_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 `GroupID`, `PriceCorrection` FROM `user-price-groups` WHERE `UserID` = 33

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
