{"repo":"a1phanumeric/PHP-MySQL-Class","free":true,"listed":false,"github":"https://github.com/a1phanumeric/PHP-MySQL-Class","clone":"git clone https://github.com/a1phanumeric/PHP-MySQL-Class.git","description":"Simple MySQL class written in PHP, for interfacing with a MySQL database.","language":"PHP","stars":360,"topics":["php-mysql","pdo","php","database","mysql"],"license":null,"category":"databases-storage","readme_excerpt":"PHP MySQL Class (PDO) A production-oriented PDO helper for PHP applications that need a small, dependency-free database abstraction with prepared statements, transaction helpers, and predictable error handling. Highlights - PDO-first API with prepared statements by default - Works with MySQL/MariaDB and Microsoft SQL Server - Safe defaults for modern workloads: - PDO::ERRMODE EXCEPTION - PDO::ATTR EMULATE PREPARES = false (MySQL) - UTF-8 ( utf8mb4 ) MySQL charset by default - Optional connection singleton keyed per connection config - Transaction helpers ( beginTransaction , commit , rollBack , transaction ) - Query execution helpers ( execute , fetch , fetchAll ) - Optional query logger for observability and diagnostics Installation Requirements - PHP =7.4 - ext-pdo - For MySQL: ext-pdo mysql - For SQL Server: ext-sqlsrv Quick Start Usage 1) Standard queries 2) Fetch a single row 3) Fetch many rows 4) Key fetchAll by a column 5) Transactions (recommended for multi-step writes) 6) Singleton connection (per unique connection configuration) 7) Connection options SQL Server example: 8) Diagnostics and observability If a query fails, inspect: API Reference - execute(string $query, $values = null, bool $debug = false): PDOStatement false - fetch(string $query, $values = null): ?array - fetchAll(string $query, $values = null, ?string $key = null): array - table exists(string $table): bool - beginTransaction(): bool - commit(): bool - rollBack(): bool - inTransaction(): bool - trans","default_branch":null,"files":null,"tree":[],"storefront":"/r/a1phanumeric","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/a1phanumeric/PHP-MySQL-Class/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}