Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Copyright (C) 2023 Kris Occhipinti
- // https://filmsbykris.com
- //
- // This program is free software; you can redistribute it and/or
- // modify it under the terms of the GNU Affero General Public
- // License as published by the Free Software Foundation;
- // version 3 of the License.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- // Affero General Public License for more details.
- //
- // You should have received a copy of the GNU Lesser General Public License
- // along with this program; if not, write to the Free Software Foundation,
- // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- // https://www.gnu.org/licenses/agpl-3.0.txt
- $table = "invoices";
- $db = new SQLite3('db/invoices.db');
- $results = $db->query("SELECT * FROM $table");
- $data = array();
- while ($row = $results->fetchArray(SQLITE3_ASSOC)) {
- array_push($data,$row);
- }
- print json_encode($data);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement