PHPackages                             invincible-tech-systems/easeampmysql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. invincible-tech-systems/easeampmysql

ActiveLibrary[Database &amp; ORM](/categories/database)

invincible-tech-systems/easeampmysql
====================================

A very simple and safe PHP library to execute SQL Queries as Prepared Statements on MySQL Database, in an asynchronous &amp; non-blocking way. Methods are provided to prepare a SQL Statement &amp; it's execution separately as different methods (to facilitate caching of prepared statements) as well as together in a single method too, all basing upon Amphp, an event driven concurrent framework in php and its Amphp\\Mysql package.

1.0.7(5y ago)1632MITPHPPHP &gt;=7.2

Since Jan 22Pushed 5y agoCompare

[ Source](https://github.com/invincible-tech-systems/easeamp-mysql)[ Packagist](https://packagist.org/packages/invincible-tech-systems/easeampmysql)[ Docs](https://www.invincibletechsystems.com/)[ RSS](/packages/invincible-tech-systems-easeampmysql/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (2)

EaseAmpMysql
============

[](#easeampmysql)

> A very simple and safe PHP library to execute SQL Queries as Prepared Statements on MySQL Database, in an asynchronous &amp; non-blocking way. Methods are provided to prepare a SQL Statement &amp; it's execution separately as different methods (to facilitate caching of prepared statements) as well as together in a single method too, all basing upon Amphp, an event driven concurrent framework in php and its Amphp\\Mysql package.

### Why EaseAmpMysql?

[](#why-easeampmysql)

Doing SQL Queries on MySQL/MariaDB in a simple and secure way, preventing SQL Injection is always an important thing. on other hand, doing SQL Queries in an asynchronous &amp; non-blocking way improves the responsiveness w.r.t. database queries. This library is based upom Amphp\\MySQL Package.

### Advantages

[](#advantages)

- Uses prepared statements
- MySQL/MariaDB Connection object supported at present
- Named parameters syntax, similar to that of PDO syntax, is supported
- While sanitizing inputs is always a good practice, values that are provided as input to `runPreparedQuery` or `executeQuery` methods serve the purpose by securely executing respective DB queries
- Have required checks to find database connection errors and to reconnect to the database when preparing db queries

### Getting started

[](#getting-started)

With Composer, run

```
composer require invincible-tech-systems/easeampmysql:^1.0.7
```

Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PDOLight.

To include the library,

```
