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

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

hybridlogic/db-querybuilder
===========================

A MySQL Query Builder for effortlessly composing SQL statements with support for executing them against databases.

v1.0.2(13y ago)13321MITPHPPHP &gt;=5.3.0

Since Jan 3Pushed 13y ago3 watchersCompare

[ Source](https://github.com/Dachande663/PHP-DB-QueryBuilder)[ Packagist](https://packagist.org/packages/hybridlogic/db-querybuilder)[ Docs](https://github.com/Dachande663/PHP-DB-QueryBuilder)[ RSS](/packages/hybridlogic-db-querybuilder/feed)WikiDiscussions master Synced 1mo ago

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

DB Query Builder
================

[](#db-query-builder)

A MySQL Query Builder for effortlessly composing SQL statements with support for executing them against databases.

0.0 Table of Contents
---------------------

[](#00-table-of-contents)

- Introduction
- Examples
- Running Tests
- Troubleshooting
- Changelog

1.0 Introduction
----------------

[](#10-introduction)

Query Builder makes it effortless to create complex SQL statements from simple method calls. With support for escaping and aliasing, you'll never worry about injecting the wrong data into your database ever again.

Query Builder currently targets the MySQL version of the SQL specification.

@todo Add composer dependency for github.com/Dachande663/PHP-DB

2.0 Examples
------------

[](#20-examples)

```
$sql = Query::select(array('m.name', 'movie'), array('t.name', 'theatre_name'), 'visited_date')
	->from(array('visits', 'v'))
	->join(array('movies', 'm'))->on('v.movie_id', '=', 'm.id')
	->join(array('theatres', 't'))->on('v.theatre_id', '=', 't.id')
	->where('m.rating', '>=', 80)
	->order_by('v.visited_date', 'DESC')
	->limit(5)
	->as_object('MovieVisit')
	->sql();
```

3.0 Running Tests
-----------------

[](#30-running-tests)

phpunit tests

Please note the test suite is currently incomplete.

4.0 Troubleshooting
-------------------

[](#40-troubleshooting)

@todo

5.0 Changelog
-------------

[](#50-changelog)

- **\[2012-12-08\]** Initial Version
- **\[2013-01-02\]** First Release

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~5 days

Total

3

Last Release

4875d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aedcc742160323259a035924ab75295484c394d67fe1ab3b855620ba790785eb?d=identicon)[Dachande663](/maintainers/Dachande663)

---

Top Contributors

[![Dachande663](https://avatars.githubusercontent.com/u/106847?v=4)](https://github.com/Dachande663 "Dachande663 (7 commits)")

---

Tags

mysqlsqlqueryquerybuilderdb

### Embed Badge

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

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

###  Alternatives

[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)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

925511.7k13](/packages/envms-fluentpdo)[illuminated/db-profiler

Database Profiler for Laravel Web and Console Applications.

168237.4k](/packages/illuminated-db-profiler)[lichtner/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921274.8k6](/packages/lichtner-fluentpdo)[fpdo/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

921244.9k7](/packages/fpdo-fluentpdo)[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)

PHPackages © 2026

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