Skip to content

Instantly share code, notes, and snippets.

View mezantrop's full-sized avatar
🔀
See my other projects: https://gitlab.com/users/mezantrop/projects

Mikhail Zakharov mezantrop

🔀
See my other projects: https://gitlab.com/users/mezantrop/projects
View GitHub Profile
@mezantrop
mezantrop / SQLite-PHP-quickstart.php
Created February 23, 2024 11:09 — 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.
#!/usr/bin/python3
# -----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# [email protected] wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Mikhail Zakharov
# -----------------------------------------------------------------------------