Load and execute SQL files with PHP
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
Effectively manage PHP MySQL inserts from a large loop using the PDO connection. The key is to avoid committing data on each loop, this is done using a transaction. Use…
How to enable the GD image library for PHP 8 with XAMPP on Windows. All that’s needed is a simple php.ini file edit. Enable GD PHP 8 XAMPP To enable…
Modern PHP PDO MySQL database backup script which includes a gzip compression option. Modified from this Stack Overflow post, the script is easy to use with configurable options for the…
A PHP isset, empty, and is null helper function comparison with a table for variables and common types. Quick rundown isset() returns true when the variable has a value, is…
A shortcut method to quickly creating dynamic Chart.js bar charts using PHP and data from a MySQL database. This blog post is for a single Y-axis bar chart. Gist link….
Efficiently load and read from large files in PHP with the built-in SplFileObject class. fopen() becomes very slow and bogged down once the file size starts getting above a couple…
The handful of SQLite database column data types for storing, Unlike the vast amount of data types MySQL accommodates, SQLite only has 5 types. A simpler and more refined approach…
SQLite is a serverless, self-contained database that in practice works straight out of the box. With no need to install or run to access and use. The SQLite library is…
A method to easily and quickly find what php.ini configuration file is loaded and in use. The php.ini file holds all of the configuration values for your PHP installation. It…