PHPackages                             csanquer/querybuilder - 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. csanquer/querybuilder

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

csanquer/querybuilder
=====================

SQL Query Builder library

0.8(13y ago)220LGPL-3.0PHPPHP &gt;=5.3

Since Mar 28Pushed 13y ago2 watchersCompare

[ Source](https://github.com/csanquer/QueryBuilder)[ Packagist](https://packagist.org/packages/csanquer/querybuilder)[ RSS](/packages/csanquer-querybuilder/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (4)Used By (0)

SQLQueryBuilder
===============

[](#sqlquerybuilder)

[![Build Status](https://camo.githubusercontent.com/f7eb9ac38c7660b74f1f33fc55bcaae657ad8bdd8a96f0b3a4818a2741f91e3e/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6373616e717565722f51756572794275696c6465722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/csanquer/QueryBuilder)

Classes used to build programmatically standard SQL Queries (with some MySQL specific functions). These classes must be used with PDO and parameters are always bound .

Based on original work by Justin Stayton And some classes from Propel ORM project  .

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

[](#installation)

The easiest way is to use [composer](http://getcomposer.org/) and [packagist.org](http://packagist.org/) package [csanquer/querybuilder](http://packagist.org/packages/csanquer/querybuilder).

Or copy manually the src/SQL directory and use a [PSR-0 autoloader](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md).

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

[](#requirements)

- PHP &gt;= 5.3.0

Getting Started
---------------

[](#getting-started)

Read the documentation

[Read the API documentation](http://csanquer.github.com/QueryBuilder/api/) generated by [PHP Documentor 2](http://www.phpdoc.org/)

Licensing
---------

[](#licensing)

License LGPL 3

- Copyright (C) 2009-2010 Justin Stayton
- Copyright (C) 2011 Matt Labrum
- Copyright (C) 2011-2012 Charles SANQUER

This file is part of SQLQueryBuilder.

SQLQueryBuilder is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SQLQueryBuilder is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with SQLQueryBuilder. If not, see .

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~111 days

Total

2

Last Release

5049d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05c2e278704a83b52b1279199dd99f22e74ba7e6331217d59e345ba85e5ff7d0?d=identicon)[csanquer](/maintainers/csanquer)

---

Top Contributors

[![csanquer](https://avatars.githubusercontent.com/u/372677?v=4)](https://github.com/csanquer "csanquer (42 commits)")

---

Tags

sqlquery

### Embed Badge

![Health badge](/badges/csanquer-querybuilder/health.svg)

```
[![Health](https://phpackages.com/badges/csanquer-querybuilder/health.svg)](https://phpackages.com/packages/csanquer-querybuilder)
```

###  Alternatives

[rennokki/laravel-eloquent-query-cache

Adding cache on your Laravel Eloquent queries' results is now a breeze.

1.1k4.0M14](/packages/rennokki-laravel-eloquent-query-cache)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[nilportugues/sql-query-builder

An elegant lightweight and efficient SQL QueryInterface BuilderInterface supporting bindings and complicated query generation.

425239.4k6](/packages/nilportugues-sql-query-builder)[supliu/laravel-query-monitor

Laravel Query Monitor

287111.9k](/packages/supliu-laravel-query-monitor)[illuminated/db-profiler

Database Profiler for Laravel Web and Console Applications.

168237.4k](/packages/illuminated-db-profiler)[nilportugues/sql-query-formatter

A very lightweight PHP class that reformats unreadable and computer-generated SQL query statements to human-friendly, readable text.

401.1M24](/packages/nilportugues-sql-query-formatter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
