# [24-Jul-2023 10:48:53] /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
# [24-Jul-2023 10:49:10] /finance/root/bg/ajax/invoices/form/clone/2030.html?pid=2030&_=1690184950410 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 2030
            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
# [24-Jul-2023 10:49:45] /finance/root/bg/ajax/invoices/insert.html?_=1690184985621 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 9 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` = '2049', `Language` = 'bg', `PostDate` = '2023-07-24 10:49:45', `LastUpdate` = '2023-07-24 10:49:45', `Type` = '1', `ParentID` = 0, `Data` = 'iPGJrTaa11jtSCp-F06AXrPeEbmU82irIez6mwf3eRnm9D5TJJ-9gSreMUurW0qxz0qnwQ4UQdLUkv7TukcPqMIO9omJNRqnSaK_g9oha9eGxjLt-4eM3g8gChFySZz6V_9SBB4UWuebMDx-LGkIPMCpYAsLk93f9ZCCgvPGmMqOm4phva8YRjoO9a-NBlJbxShkzwJICP2smseB3jon4l3ZmJ6Vd2XJKlTv2wKqbb1Mv7zxo2UEeDwkU2cJpE6pDgZkwchyjEg4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8Ih4ny4NhEoOYoqMLDTF5GgLD0kAYNFbWZVr3LqPKszO1W-gBbkN1GJZoA8DcWwIbZSa9aLasqfiPVn8UNwuIwlwLrKRMNiUB7B6gRMqhiUHkC5E8n6LC1ujt_FezsZ8WEhwap-GLB_o2DEJbnpVK7IzT0XzMcXkcMl2qUy95xQNcHrKXGBViNFlPYc-ZeD_AZoN4IYF6tIT7T5h8Cm-ulj6z72lke-JEpU1B0KJZywH2nH_SJb5o4j9R4N4hft-qjPBWwIyTqdXRErVIHZCAM5WctYXmmk2dNaBTKRC6kcDaB4abL19aVfXtEI7rhQdItKwihotW3V2v8_ApX2nns76GVhBcTUYp2sht6AN4bHqUZJjY8V_rMN46aYjQlsR6mgZjSXB2HSX71XoQF-51Tx34NRQqv53oOUkwxJ3H8rTrTpYtxhAkDEpRoGx0mT8iZRmN2dbPbVJ75jaC4VwTAZ8pT9W8KhmzDew-lzzTgMDBLQ5OVISak9APbuMCfPV8WkVNtJWWYc', `SearchKey` = 'wofCpMK4wrDgsKlwqDrcKDwqTCwofCpMKnwrDg8OgwqCwrrCisOGw6PCsMKew4LDo8K1wovCvsOGw4fCwofCscOAwrDg8KlwrPCtcKDwqTCsMKrw5jDn8KdwqbChMKhwqrCvMOXw5TCiMKHwp3DgMwofCpMKjwrDgMwofCscK0wrDgcOQwqCqsKDwqTDosKrw5jCucKdwqfChMKhwoXCvMOUwwofCpMOiwrDgMK6wqCrMKDwqTDi8Krw5jCucKd'
# [24-Jul-2023 10:49:45] /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
# [24-Jul-2023 10:49:48] /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
# [24-Jul-2023 10:51:05] /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
# [24-Jul-2023 10:51:07] /finance/root/bg/invoices/2049.html 167.99.142.201

set names utf8

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

SELECT
                `Label`,
                `Value`
            FROM
                `labels`
            WHERE
                `Label` IN ('Jul') AND
                `Language` = 'bg'
             ORDER BY
                `labels`.`Label` ASC
# [24-Jul-2023 10:52:16] /finance/root/bg/invoices/2049.html 167.99.142.201

set names utf8

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

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