luisaedev / flex-pdo
Flexible and fancy class for PHP, it will help you to handle PDO connections and PDO statements through a single instance.
README
This class will help you to handle easily PDO connections and PDO statements using chained methods through a single instance.
Documentation, installation, and usage instructions
See the documentation for detailed installation and usage instructions.
Out of the box
Once installed you can do stuff like this:
<?php require_once __DIR__ . '/vendor/autoload.php'; use LuisaeDev\FlexPDO\FlexPDO; // Create a new FlexPDO instance $fpdo = new FlexPDO([ 'dbname' => 'db-name', 'user' => 'username', 'password' => 'your-password' ]); // Prepare a SQL statement // Bind a 'status' parameter // Execute it $fpdo ->prepare('SELECT * FROM users WHERE status = :status') ->bind(':status', 1, 'int') ->execute(); // Fetch each result while ($row = $fpdo->fetch()) { print_r($row); } ?>
License
The MIT License (MIT). Please see License File for more information.
About me
I’m a software engineer with more than 12 years of professional experience and skill enhancement. Specialized in web application development and REST API’s. I have a strong knowledge and experience on Backend [PHP] for the creation of complex and decoupled architectures. My experience covers: Backend and Frontend technologies, SQL and NoSQL databases, GIT, LAMP servers, cloud services as well of other services related to software development and coding.
For more information, visit my website www.luisae.dev