# [10-Jun-2025 10:18:24] /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
# [10-Jun-2025 10:18:29] /finance/root/bg/ajax/invoices/form/clone/2464.html?pid=2464&_=1749539909738 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `invoices`
            WHERE
                `ID` = 2464
            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
# [10-Jun-2025 10:18:42] /finance/root/bg/ajax/invoices/insert.html?_=1749539922719 167.99.142.201

set names utf8

SELECT
                *
            FROM
                `clients`
            WHERE
                `ID` = 74 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` = '2499', `Language` = 'bg', `PostDate` = '2025-06-10', `LastUpdate` = '2025-06-10 10:18:42', `Type` = '1', `ParentID` = 0, `Data` = 'd-lrSq_pMRMJHul5h9O7QoDxspehSUWCJ6F5nyyefrNgtV3-1w4OckwvmHk05DV_j8r8cO5Y9iZ1q_LkjKshoafItyEaDttt9on7OCIyA0BhzP0MIBHACz_RyjHQpUlnNR1_e9mHeBCUcLjC83Gp4FDwZV9QKB4ncEBE8fHTlRT4GSKj70cySFoa4bVQYH-KzAcvckB_a5WlHlAbuXmP7gSfJyYPA0ntUFN_u4VcosXB42vqnKJW6kE7vWb8b4KubL4_pqAB3sFMZLQy0XHOHV52h3_HAtPXAY-ZATdkaWlByLa7q1VMWuLLE-XiIzBb0OBPS7Ph7WCA37Eoz_PN_FMrO9Ism72leplDQnbaxZg8ZiDMyJrXAoUy4sL-FGwSR9oDbkx-28YmCL7OQynKPn4rxhVUObwoZgVa1qBfvjD13fNy-a_FGn2p8LN7YbqkOKQFjKFgWsGpKUkH3S_Kll-_jiT2byLeUE9sap_rEsXdjfPczYbzUWsgL7hsOOGRTu9dnxzelPNd5BPtcZ_IESxKmxzxE_ZCZUsDJqPyqBcUA8DvzkS_xlIHJMQNdMfys2e78Kh9GFDUcMNh8OAjm1Je7Zm8Maz2Ml9FQlOX9GLsgiMKSEI5v5haN2gctuLloeDRd3Xy-VNxjA-qvjz9cja_z498704gnecb_dAlbX0-_2NaWVxxdRkYBqfinir7DzF3AEXy22nAqT01JpsMj3VbpBXk0GO2b-UcS22om-XAN8qBev-1Xl8q1lhlG2UoIVLyywkIbuhfkr3jflBjB9OY2RZq9NFWKmyFnU6tqDYvU3t5G_wyBAcCHl3Ugs7n28RqN_P7ifYk8eBCGSEmIq6XSNAoELaDUPOBOn_4g0bKNlodhd852Qy4mgThv3bu-nqm3lc8UVHqO3XAzL_wv9ddAjXXxh1xKcoyDanpvKA', `SearchKey` = 'wofCscK0wrDgcOQwqCrMKDwqTDhMKrw5nCwofCpMKnwrDg8OgwqCwrrCi8OCw5rCsMOZw5jDqMKswrDCwofCpMOEwrDgsK6wqDrsKDwqTDlsKsw4zDn8Kdw6bChMKhw4jCvMOVw5TCiMwofCpMOqwrDgMK6wrPCtcKDwqTDnsKrw5nDj8KhwrLChMKhwrzCvMOXw5TCiMwrrCi8OCw5rCsMOZw5jDqMKswrDC'
# [10-Jun-2025 10:18:42] /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
# [10-Jun-2025 10:18:47] /finance/root/bg/invoices/2499.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` = 2499
            LIMIT 1

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