Skip to content

Instantly share code, notes, and snippets.

View kmfoysal06's full-sized avatar
๐Ÿ˜ƒ
Great

kazi mohammad Foysal kmfoysal06

๐Ÿ˜ƒ
Great
View GitHub Profile
@kmfoysal06
kmfoysal06 / SQLite-PHP-quickstart.php
Created March 5, 2025 23:49 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.