
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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004"}'

set names utf8

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

set names utf8

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

set names utf8

SELECT
                `parts`.`ID`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                `parts`.`Visible`
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
                INNER JOIN `part-groups` ON `parts`.`ID` = `part-groups`.`PartID`
                INNER JOIN `groups` AS `SubGroup` ON `SubGroup`.`ID` = `part-groups`.`GroupID` AND `SubGroup`.`Language` = 'bg'
                LEFT JOIN `groups` AS `ParentGroup` ON `ParentGroup`.`ID` = `SubGroup`.`ParentID` AND `ParentGroup`.`Language` = 'bg'
            WHERE
                `parts`.`IsNew` = 1 AND
                `parts`.`Visible` = 1 AND
                `parts`.`PostDate` > DATE_SUB(NOW(), INTERVAL 3 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.1.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_gat_gtag_UA_36979575_1":"1","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g0$t1763537971$j60$l0$h0"}'

set names utf8

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

set names utf8

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

set names utf8

SELECT `Num` FROM `log` WHERE `IP` = '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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.2.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_gat_gtag_UA_36979575_1":"1","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763537972$j59$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7"}'

set names utf8

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

set names utf8

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

set names utf8

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

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

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

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

set names utf8

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

SELECT
                `parts`.`ID`,
                `ParentGroup`.`URLLabel` AS `ParentGroupUrlLabel`,
                `SubGroup`.`URLLabel` AS `GroupUrlLabel`,
                `parts`.`RefNumber`,
                `parts`.`Label`,
                `part-texts`.`Title`,
                `part-texts`.`URLLabel`,
                `parts`.`Gallery`,
                `parts`.`Visible`
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
                INNER JOIN `part-groups` ON `parts`.`ID` = `part-groups`.`PartID`
                INNER JOIN `groups` AS `SubGroup` ON `SubGroup`.`ID` = `part-groups`.`GroupID` AND `SubGroup`.`Language` = 'bg'
                LEFT JOIN `groups` AS `ParentGroup` ON `ParentGroup`.`ID` = `SubGroup`.`ParentID` AND `ParentGroup`.`Language` = 'bg'
            WHERE
                `parts`.`IsNew` = 1 AND
                `parts`.`Visible` = 1 AND
                `parts`.`PostDate` > DATE_SUB(NOW(), INTERVAL 3 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
                            `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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.1.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_gat_gtag_UA_36979575_1":"1","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763537975$j56$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7"}'

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
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 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
                    *
                FROM
                    `groups`
                WHERE
                    `URLLabel` = 'madeinmonea' 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 'madeinmonea' 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.1.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_gat_gtag_UA_36979575_1":"1","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763537976$j55$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7"}'

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
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

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

set names utf8

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

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968

set names utf8

SELECT
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        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
                    *
                FROM
                    `groups`
                WHERE
                    `URLLabel` = 'madeinmonea' 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 'madeinmonea' 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.2.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763537983$j48$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7"}'

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
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

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

set names utf8

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

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968

set names utf8

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

SELECT * FROM `parts` LIMIT 1

SHOW COLUMNS FROM `parts`

UPDATE `parts` SET `ID` = '144968', `AdminID` = 33, `RefNumber` = 'IR7060RP', `Barcode` = '1000364706005', `PostDate` = '2018-08-14 09:41:22', `LastUpdate` = '2025-11-19 09:41:22', `Gallery` = '["img_4799-removebg-preview.jpg","img_4800-removebg-preview.jpg","img_4801-removebg-preview.jpg","img_4802-removebg-preview.jpg","img_4803-removebg-preview.jpg","img_4804-removebg-preview.jpg","img_4805-removebg-preview.jpg","img_4806-removebg-preview.jpg","img_4807-removebg-preview.jpg","img_4808-removebg-preview.jpg","img_4809-removebg-preview.jpg","img_4810-removebg-preview.jpg","img_4811-removebg-preview.jpg","img_4812-removebg-preview.jpg","img_4813-removebg-preview.jpg","img_4814-removebg-preview.jpg","img_4815-removebg-preview.jpg","img_4816-removebg-preview.jpg","img_4817-removebg-preview.jpg","img_4818-removebg-preview.jpg"]', `PartType` = 'alternators', `Connecteur` = 'C04', `Label` = '', `Weight` = '4.653', `BoxSize` = '', `MinQuantity` = '1.00', `Orange` = '5.00', `Price` = '0.00', `PromoPrice` = '0.00', `PriceGroup` = '1.00', `DeliveryDate` = NULL, `Supplier` = '', `DeliveryQuantity` = 0, `DeliveryMinQuantity` = 0, `IsPromo` = 0, `IsNew` = 0, `IsQuantity` = 0, `Visible` = 1, `QtyOrder` = 1, `MetaImage` = '', `TechInfo` = '' WHERE `ID` = '144968'

SELECT * FROM `part-texts` LIMIT 1

SHOW COLUMNS FROM `part-texts`

UPDATE `part-texts` SET `PartID` = '144968', `Language` = 'bg', `MetaTitle` = 'Meta заглавие', `MetaDescription` = 'АЛТЕРНАТОР ДИНАМО ЗА CITROËN', `MetaKeywords` = '', `Title` = 'РЕЦИКЛИРАН АЛТЕРНАТОР IR7060RP', `URLLabel` = 'алтернатор-ir7060rp' WHERE `PartID` = '144968' AND `Language` = 'bg'

DELETE FROM `part-groups` WHERE `PartID` = '144968'

INSERT INTO `part-groups` (`PartID`, `GroupID`) VALUES 
	('144968', '25'),
	('144968', '2000');

DELETE FROM `part-params` WHERE `PartID` = '144968'

INSERT INTO `part-params` (`PartID`, `ParamID`, `ParamValue`) VALUES 
	('144968', '125', '43.50'),
	('144968', '126', '27.00'),
	('144968', '74', '66.00'),
	('144968', '127', '8.00'),
	('144968', '128', '10.50'),
	('144968', '129', 'M10x1.5'),
	('144968', '3', 'P6'),
	('144968', '123', '63.50'),
	('144968', '4', 'C04'),
	('144968', '10004', '3'),
	('144968', '10003', '70 A'),
	('144968', '10001', '12 V'),
	('144968', '10006', '6H03');

SELECT
                    `ParentID`,
                    `URLLabel`
                FROM
                    `groups`
                WHERE
                    `ID` = 25 AND
                    `Language` = 'bg'
                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
                    *
                FROM
                    `groups`
                WHERE
                    `URLLabel` = 'alternators' 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` = 144968 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` = 144968 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` = 144968 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` = 144968 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` = 144968 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` = 144968 
                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` = 144968 
            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` = 144968
            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` = 'IR7060RP'
            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` = 'alternators' 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.2.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763538072$j59$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7","_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
                `vehicles`.`ManufacturerID` AS `ID`,
                `vehicles`.`Marque` AS `Name`
            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'
                INNER JOIN vehicles ON `parts`.`RefNumber` = `vehicles`.`RefNumber`
            WHERE
                (`SubGroup`.`ID` = 25 OR `ParentGroup`.`ID` = 25)
            GROUP BY
                `vehicles`.`Marque`
            ORDER BY
                `vehicles`.`Marque`

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
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 LIMIT 1

set names utf8

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

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968

set names utf8

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

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968

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` = 'alternators' 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` = 144968 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` = 144968 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` = 144968 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` = 144968 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` = 144968 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` = 144968 
                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` = 144968 
            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` = 144968
            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` = 'IR7060RP'
            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` = 'alternators' 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.2.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763538083$j48$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7","_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
                `vehicles`.`ManufacturerID` AS `ID`,
                `vehicles`.`Marque` AS `Name`
            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'
                INNER JOIN vehicles ON `parts`.`RefNumber` = `vehicles`.`RefNumber`
            WHERE
                (`SubGroup`.`ID` = 25 OR `ParentGroup`.`ID` = 25)
            GROUP BY
                `vehicles`.`Marque`
            ORDER BY
                `vehicles`.`Marque`

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
                `URLLabel`
            FROM
                `pages`
            WHERE
                `Rules` = 'cookies' AND
                `Language` = 'bg'
         AND `Visible` = 1 LIMIT 1

set names utf8

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

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968

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` = 'madeinmonea' 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 2000 OR `ParentGroup`.`ID` = 2000) 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` = 'madeinmonea' 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:146.0) Gecko/20100101 Firefox/146.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:146.0) Gecko/20100101 Firefox/146.0',
                `Cookie` = '{"-mg:u-":"d3BmQ2wxOW4","-mg:cp-":"1","_gcl_au":"1.1.2140073615.1763035867.1480041533.1763035872.1763037004","_ga":"GA1.2.668921507.1763537972","_gid":"GA1.2.917782965.1763537972","_ga_M9CT0S3L0L":"GS2.1.s1763537971$o1$g1$t1763538088$j43$l0$h0","PHPSESSID":"gais9rtus08bg3mbg4j8loerg7","_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
                            `PriceListID`,
                            `PriceVisible`,
                            /*`PriceCorrection`,*/
                            `OEMSearch`,
                            `WithoutQty`
                        FROM
                            `users`
                        WHERE
                            `ID` = 33 AND
                            `UserKey` LIKE '%2'
                        LIMIT 1

SELECT
                `parts`.*,
                `part-texts`.*
            FROM
                `parts`
                INNER JOIN `part-texts` ON `parts`.`ID` = `part-texts`.`PartID`
            WHERE
                `parts`.`ID` = 144968 AND
                `part-texts`.`Language` = 'bg'
            LIMIT 1

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`,
                `Parameter`
            FROM
                `params`
            WHERE
                `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` = 144968 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` = 144968 AND
                `Language` = 'bg'
            ORDER BY
                `Parameter` ASC

SELECT `GroupID` FROM `part-groups` WHERE `PartID` = 144968
