PHPackages                             canteen/database - 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. canteen/database

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

canteen/database
================

Abstract mysqli library for use with the Canteen Framework.

1.1.3(12y ago)03131MITPHPPHP &gt;=5.4.0

Since Oct 12Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Canteen/CanteenDatabase)[ Packagist](https://packagist.org/packages/canteen/database)[ Docs](http://github.com/Canteen/CanteenDatabase)[ RSS](/packages/canteen-database/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (6)Used By (1)

\#Canteen Database

Abstract mysqli library for use with the Canteen Framework. For documentation of the codebase, please see [Canteen Database docs](http://canteen.github.io/CanteenDatabase/).

\##Installation

Install is available using [Composer](http://getcomposer.org).

```
composer require canteen/database dev-master
```

Including using the Composer autoloader in your index.

```
require 'vendor/autoload.php';
```

\##Setup

```
use Canteen\Database;
$db = new Database(
	'localhost', 	// MySQL host
	'root', 		// MySQL username
	'12341234', 	// MySQL user's password
	'my_database'	// Database name
);
```

\##Sample Usage

Create SQL queries with a simple, intuitive, object-oriented API.

```
// Create a select query of a properties
// on a user's table of all active users
$users = $db->select('user_id', 'first_name', 'last_name')
	->from('users')
	->where('active=1')
	->results();
```

\###Rebuild Documentation

This library is auto-documented using [YUIDoc](http://yui.github.io/yuidoc/). To install YUIDoc, run `sudo npm install yuidocjs`. Also, this requires the project [CanteenTheme](http://github.com/Canteen/CanteenTheme) be checked-out along-side this repository. To rebuild the docs, run the ant task from the command-line.

```
ant docs
```

\##License##

Copyright (c) 2013 [Matt Karl](http://github.com/bigtimebuddy)

Released under the MIT License.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

4598d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.0.1PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![bigtimebuddy](https://avatars.githubusercontent.com/u/864393?v=4)](https://github.com/bigtimebuddy "bigtimebuddy (5 commits)")

---

Tags

databasemysqlmysqli

### Embed Badge

![Health badge](/badges/canteen-database/health.svg)

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

###  Alternatives

[sergeytsalkov/meekrodb

The Simple PHP/MySQL Library

341387.0k10](/packages/sergeytsalkov-meekrodb)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86946.7k](/packages/ezsql-ezsql)[stefangabos/zebra_database

An advanced, compact and lightweight MySQL database wrapper library, built around PHP's MySQLi extension.

11812.0k](/packages/stefangabos-zebra-database)[go/db

Database library

6624.1k](/packages/go-db)[krugozor/database

PHP class library for simple, convenient, fast and safe work with MySql database, using PHP mysqli extension and imitation of prepared queries.

392.5k](/packages/krugozor-database)[dabble/dabble

Lightweight wrapper and helpers for MySQLi

1210.4k](/packages/dabble-dabble)

PHPackages © 2026

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