# [16-May-2024 11:12:44] /finance/root/bg/invoices.html 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [16-May-2024 11:12:45] /finance/root/bg/proforma.html 167.99.142.201

set names utf8

SELECT
                    `Inv`.*,
                    `Original`.`ID` AS `OriginalID`
                FROM
                    `invoices` AS `Inv`
                    LEFT JOIN `invoices` AS `Original` ON `Inv`.`ID` = `Original`.`ParentID`
                WHERE
                    `Inv`.`Type` = 0
             ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [16-May-2024 11:12:48] /finance/root/bg/invoices/10402.html 167.99.142.201

set names utf8

SELECT
                `Inv`.*,
                `Original`.`PostDate` AS `OriginalPostDate`
            FROM
                `invoices` AS `Inv`
                LEFT JOIN `invoices` AS `Original` ON `Inv`.`ParentID` = `Original`.`ID`
            WHERE
                `Inv`.`ID` = 10402
            LIMIT 1

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('May') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [16-May-2024 11:12:52] /finance/root/bg/ajax/invoices/form/clone/10402.html?pid=10402&_=1715847172103 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 10402
            LIMIT 1

SELECT
                `ID`,
                `Data`
            FROM
                `clients`
            WHERE
         `Type` = 0 AND 
                    `Top` = 1
                ORDER BY
                    `PostDate`
                LIMIT 20

SELECT
                `ID`,
                `Data`
            FROM
                `clients`
            WHERE
         `Type` = 1 AND 
                    `Top` = 1
                ORDER BY
                    `PostDate`
                LIMIT 20
# [16-May-2024 11:12:59] /finance/root/bg/ajax/invoices/insert.html?_=1715847179257 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 63 AND
                `Visible` = 1
            LIMIT 1

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 1 AND
                `Visible` = 1
            LIMIT 1

SELECT MAX(`ID`) + 1 FROM `invoices` WHERE `Type` > 0 AND `ID` < 1000000000

SELECT * FROM `invoices` LIMIT 1

SHOW COLUMNS FROM `invoices`

INSERT INTO `invoices` SET `ID` = '2246', `Language` = 'bg', `PostDate` = '2024-05-16', `LastUpdate` = '2024-05-16 11:12:59', `Type` = '1', `ParentID` = 10402, `Data` = 'Xor7qJvkSoTbzQljjKpB0tc1-xx-wKbmmid9RuiD6DvxPoBaYvLd2d_oTMWF70FS_6L3adyz7wyHMoq6BEcFUNZEIFFeplpEXVzSkWU2crJvrQQda2usKhqlq4YM8FcYECnKLNV0RU7UQGlKFQG7hJujnLhSuJHZHQLdgRSXm38t1CziTYFGG8XHHjwjCXRewqzI8d7bBE9zeZnMsGBhHIAyW7HDQueLYxnjR5FlWe8e_o6TqTA1n10F7BP1zQOHR1KB1HudAGHvs9jV6Mpsm_jYMf0gfVulQ9PlKZ6NfoeckrHXUSPOktxMMN99dajpsl0724YRrIBV4pajPW-7YL4iOG_3yz8HPx7TmU5ZS6wWO5JknUev62t_00EyqY1YGCLdipqt6WAG3g_NwXfBlmW_EeaBZeWVZceJKNYkaKHe2Jhq9LWlS_EmkFhQ-fR_ggoqtwMsJ8J5wQ1GMV9eRyTuhqoXsKQAlFu_T4AJVtDrfl1F5O-oB5Ge7ozmURIwZU9TWpc6H5aoT3FA9Nx4WGoIKroG0YHSS35smC0lRhWBlGEJ8LbmOldwdDlMu0WhfgxTWNz9jmgyUq0MVNvz1LrO0qhm1c_JHWBgNvP6NtNLLScEkAsFmRV6MWpfofPiGNmTorwTgTLgttMh9Fqplk1sba0wtT6YHgP_SrfJ7BVSj52iEpL1g0_B3MU37opS6i6h4203DzNHVjxJSjCH8IlP-IctvrH3bCZ7f1ixHEFCGY0U5UUUXu_XjPFO7_7MqMIZG9_ihyfnfgcqVyE0mbZPvkjvs9K5ewCF3kLeOuKECljVrjQeONuV6ZiwUiEIbtPt5rozvVXeS_LTGzkHlV8d96zPME24qBWcEtJE9VNlQpcWjXm7PT-A1vzjRdNzN9YMwyz9PujHmnXQ7zKeB8BrnIumBHXVHWlpXtbLMmyRWEhz_iRtt5K7WOKcqtjeZRySBeJnrJVMYr0ckO-8KiR78TXEpcUsr7l0sji-b491QHarWEOl51NbNfs-Zo7Rx4YZEEm9J2sEMlTS2nxOiGWoNSxHFY3deoT_Mn0RS33KPH4i7DJvVZ5tr78oFa0a15KlqdqIRDvmyy1Np4YI-7AYM3bDKRcyAMPAdt4IjGyE_7Hj5hKRHAYggvDdEyvzhknacbNOpp_dWzsclRCKXe9K9Ka9gHmIcfxV4yw6v8csx_04bPcl0s-AnHhHvwN6', `SearchKey` = 'wofCpMOPwrDg8OgwqCq8KDwqTDlsKsw4zDn8KdwqPChMKuwrjCvMOVw5TCjMKVwp3DgMOTwqPCuswofCpMOPwrDgMK6wrPCtcKDwrHCuMKrw5rCucKhwwofCpMOqwrDg8OgwrPCtcKDwqTCsMKrw5rDwofCpMOIwrDgcK6wqCqMKDwqTCn8Ksw4zDj8KhwrLChMKhwp7CvMOXwwofCscOWwrDgcOQwrPCtsKDwrHCwrrCoMKyw6LCp8ODwrrDwo'
# [16-May-2024 11:12:59] /finance/root/bg/proforma.html 167.99.142.201

set names utf8

SELECT
                    `Inv`.*,
                    `Original`.`ID` AS `OriginalID`
                FROM
                    `invoices` AS `Inv`
                    LEFT JOIN `invoices` AS `Original` ON `Inv`.`ID` = `Original`.`ParentID`
                WHERE
                    `Inv`.`Type` = 0
             ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [16-May-2024 11:13:01] /finance/root/bg/invoices.html 167.99.142.201

set names utf8

SELECT * FROM `invoices` AS `Inv` WHERE `Inv`.`Type` > 0 ORDER BY `Inv`.`PostDate` DESC, `Inv`.`ID` DESC
# [16-May-2024 11:13:07] /finance/root/bg/invoices/2246.html 167.99.142.201

set names utf8

SELECT
                `Inv`.*,
                `Original`.`PostDate` AS `OriginalPostDate`
            FROM
                `invoices` AS `Inv`
                LEFT JOIN `invoices` AS `Original` ON `Inv`.`ParentID` = `Original`.`ID`
            WHERE
                `Inv`.`ID` = 2246
            LIMIT 1

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