PHPackages                             eril/crud - 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. eril/crud

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

eril/crud
=========

Advanced CRUD operations and Query Builder with subquery support

v1.0.0(5mo ago)01MITPHPPHP ^8.0CI failing

Since Dec 3Pushed 5mo agoCompare

[ Source](https://github.com/erilshackle/crud-php)[ Packagist](https://packagist.org/packages/eril/crud)[ RSS](/packages/eril-crud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Eril CRUD - Advanced CRUD Operations &amp; Query Builder
========================================================

[](#eril-crud---advanced-crud-operations--query-builder)

[![Latest Stable Version](https://camo.githubusercontent.com/038f13b20e89838c8a6bb896fde22959251985201c56a6306d4e8acc4623a919/68747470733a2f2f706f7365722e707567782e6f72672f6572696c2f637275642f762f737461626c65)](https://packagist.org/packages/eril/crud)[![Total Downloads](https://camo.githubusercontent.com/a79e0fb6efab4c285716f89414a65c20ffdd11b83c3e31d23a9bdd247d36b203/68747470733a2f2f706f7365722e707567782e6f72672f6572696c2f637275642f646f776e6c6f616473)](https://packagist.org/packages/eril/crud)[![License](https://camo.githubusercontent.com/5f90d583efcc6fac829e8ce73f94ca329a54e1ada76937d8e915ddbf07c0df50/68747470733a2f2f706f7365722e707567782e6f72672f6572696c2f637275642f6c6963656e7365)](https://packagist.org/packages/eril/crud)[![PHP Version](https://camo.githubusercontent.com/6da9704adc310b64eea60cc463a5e5c8dd738da86ba6c3e2af0cfd4600621755/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e302d626c75652e737667)](https://php.net)

A powerful, lightweight CRUD operations library with intelligent query builder, PDO support, and automatic error logging.

Features
--------

[](#features)

- 🚀 **Simple CRUD operations** (Create, Read, Update, Delete, Select)
- 🧠 **Intelligent Query Builder** with smart WHERE clauses and subquery support
- 🎯 **Automatic parameter binding** with type detection
- 🛡️ **PDO Prepared Statements** (SQL injection protection)
- 🔌 **Connection pooling** with static PDO instance
- 📊 **Transaction support** with rollback capability
- 📝 **Automatic error logging** with CLI tool and detailed stack traces
- 🔄 **JOIN operations** (INNER, LEFT, RIGHT)
- 📊 **Aggregate functions** (COUNT, SUM, AVG, MIN, MAX)
- 📄 **Pagination and UNION queries**
- 🔍 **EXISTS/NOT EXISTS conditions**
- 🎨 **Fluent interface** with method chaining
- 🧪 **Full test suite** with PHPUnit
- 📈 **HAVING clauses** with SQLite compatibility

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- PDO extension
- MySQL/PostgreSQL/SQLite (any PDO-compatible database)

Installation
------------

[](#installation)

```
composer require eril/crud
```

Quick Start
-----------

[](#quick-start)

### 1. Setup Database Connection

[](#1-setup-database-connection)

```
