luisalonsobr/database

PDO wrapper class for safe database querying

dev-master 2021-10-22 19:45 UTC

This package is auto-updated.

Last update: 2025-06-23 03:21:19 UTC


README

An extension for PHP's PDO class designed to make running SQL statements easier. Based on http://www.imavex.com/php-pdo-wrapper-class/ Project Overview

This project provides a minimal extension for PHP's PDO (PHP Data Objects) class designed for ease-of-use and saving development time/effort. This is achived by providing methods - delete, insert, select, and update - for quickly building common SQL statements, handling exceptions when SQL errors are produced, and automatically returning results/number of affected rows for the appropriate SQL statement types. System Requirements

PHP 7
PDO Extension
Appropriate PDO Driver(s) - PDO_SQLITE, PDO_MYSQL, PDO_PGSQL
Only MySQL, SQLite, and PostgreSQL database types are currently supported.

Checkout index.php and class.db.php for more info.