Download the PHP package migliori/php-pdo-database-class without Composer
On this page you can find all versions of the php package migliori/php-pdo-database-class. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download migliori/php-pdo-database-class
More information about migliori/php-pdo-database-class
Files in migliori/php-pdo-database-class
Package php-pdo-database-class
Short Description The DB class is a database abstraction layer that provides a simple, consistent interface for interacting with different types of databases. It handles connection management, query execution, pagination and result processing
License GPL-3.0-or-later
Informations about the package php-pdo-database-class
[DEPRECATED] PHP PDO Database class
:warning: DEPRECATION NOTICE: This package is no longer maintained and has been deprecated. It's been replaced by PowerLite PDO. Please visit the PowerLite PDO GitHub repository for the latest updates and support.
This DB class provides a set of simple, intuitive methods for executing queries and retrieving data. It handles pagination, error handling and debugging.
The code is fully documented with PHPDOC. It provides types & type hinting and follows the highest coding standards (PHPSTAN Level 9).
Demo
PDO Database class - queries and pagination demos
Features
- Connection to any MySQL, Firebird, OCI (Oracle) or Pgsql (PostgreSQL) database
- SQL queries Sending
- Generation and sending of prepared PDO queries
- Functions available for all types of queries:
- Select
- SelectCount
- SelectRow
- SelectValue
- Query
- QueryRow
- QueryValue
- Execute
- Insert
- Update
- Delete
- GetColums
- GetColumnsNames
- GetTables
- TransactionBegin
- TransactionCommit
- TransactionRollback
- Pagination with configuration and options
- Register your connection settings in a single safe place
- DEBUG mode - display of SQL queries sent to the server and detailed information
- Error event handling and PHP error logging with try/catch
Requirements
PHP ^7.4, PHP 8.x
Documentation
PHP PDO Database class - Full detailed documentation, functions reference & code samples
Installation
Clone / download or install with Composer
Usage/Examples
-
Open
src/connect/db-connect.php
in your code editor and set the followings constants to connect to your database: -
Require
src/connect/db-connect.php
and you can connect to both your localhost and production server using$db = new DB();
without any argument. - Call the methods to send your queries and retrieve the results.
To see all the public methods and more examples of use of use visit https://www.phpformbuilder.pro/documentation/php-pdo-database-class.php
Example with Pagination
-
Open
database/db-connect.php
in your code editor and set the followings constants to connect to your database: - Get your records and the pagination HTML code
Running Tests
To run tests, run the following command
Contributing
Contributions are always welcome!
Please contact us for any improvement suggestions or send your pull requests