PHP Package: amphp/sql
Asynchronous MySQL database library for PHP applications with high performance and scalability.
Package Description
amphp/sql is a PHP library that provides asynchronous MySQL database access for building high-performance and scalable applications. It allows developers to execute SQL queries asynchronously, making it suitable for applications with high concurrency requirements. With features like connection pooling and query pipelining, it optimizes database interactions for improved performance. The library integrates seamlessly with Amp, a non-blocking concurrency framework for PHP, enabling developers to write efficient and responsive code. Whether you're building real-time applications, microservices, or APIs, amphp/sql simplifies database operations for modern PHP development.
Code Integration Example
Make sure to include the correct namespace and class paths for proper usage.
<?php
// Example from PHPlibraries.com
require_once 'libs/amphp/sql/lib_version/autoload.php';
use Amp\Sql\Connection;
use Amp\Sql\Pool;
use Amp\Sql\QueryError;
use Amp\Sql\ResultSet;
use Amp\Sql\Statement;
use Amp\Sql\Transaction;
use Amp\Sql\TransactionError;
$obj = new Amp\Sql\Connection();
echo "✅ Example created successfully.";
?>
We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.