PHPackages                             mos/cdatabase - 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. [Framework](/categories/framework)
4. /
5. mos/cdatabase

ActiveLibrary[Framework](/categories/framework)

mos/cdatabase
=============

PHP classes for database handling upon PDO

v0.1.1(10y ago)31.8k4[3 issues](https://github.com/mosbth/cdatabase/issues)10MITPHPPHP &gt;=5.4

Since Apr 17Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mosbth/cdatabase)[ Packagist](https://packagist.org/packages/mos/cdatabase)[ Docs](http://dbwebb.se)[ RSS](/packages/mos-cdatabase/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (10)

mos/cdatabase
=============

[](#moscdatabase)

[![Latest Stable Version](https://camo.githubusercontent.com/0d4f18ff1290b8028bb16ab96a8f3ac55f79fb1eff570ef96bb662caa2ec85aa/68747470733a2f2f706f7365722e707567782e6f72672f6d6f732f6364617461626173652f762f737461626c652e737667)](https://packagist.org/packages/mos/cdatabase) [![Total Downloads](https://camo.githubusercontent.com/a1f8a266efba4b8191084412fc1469f3e1929c043c35d36019164273766441cd/68747470733a2f2f706f7365722e707567782e6f72672f6d6f732f6364617461626173652f646f776e6c6f6164732e737667)](https://packagist.org/packages/mos/cdatabase) [![Latest Unstable Version](https://camo.githubusercontent.com/bcd51d01b68855b11c0dc94a078d8cec66f8b7bc7c5b80d6405164d8f2e640ee/68747470733a2f2f706f7365722e707567782e6f72672f6d6f732f6364617461626173652f762f756e737461626c652e737667)](https://packagist.org/packages/mos/cdatabase) [![License](https://camo.githubusercontent.com/b94bd2ee078faa06592249a1e33527366a1596340ff30276a6dca784d0363206/68747470733a2f2f706f7365722e707567782e6f72672f6d6f732f6364617461626173652f6c6963656e73652e737667)](https://packagist.org/packages/mos/cdatabase)[![Build Status](https://camo.githubusercontent.com/53e75ebfa21022e23216ccf0acc82e4542d5a337073e8811672adee468ad2183/68747470733a2f2f7472617669732d63692e6f72672f6d6f736274682f6364617461626173652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mosbth/cdatabase)[![Code Coverage](https://camo.githubusercontent.com/ab32e0876381dc5f40df907b0fbcfd8cf0c9ecceea37fe28fadd765609fa54ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f736274682f6364617461626173652f6261646765732f636f7665726167652e706e673f733d66393939616231393631363834613931303530623039353638326637616237613133636362353334)](https://scrutinizer-ci.com/g/mosbth/cdatabase/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/c23de297c32b6bb6700f52752d54e895a6a277eed62e4c4cc95e0a3ed9d88187/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f736274682f6364617461626173652f6261646765732f7175616c6974792d73636f72652e706e673f733d31633266633161663064663766623765653165346633373961383132353335383361373530323937)](https://scrutinizer-ci.com/g/mosbth/cdatabase/)

PHP classes for database handling upon PDO.

Read an article about it here ["CDatabase - PHP classes för working with SQL queries and databases"](http://dbwebb.se/opensource/cdatabase)

By Mikael Roos, .

License
-------

[](#license)

This software is free software and carries a MIT license.

History
-------

[](#history)

v0.1.1\* (2016-02-03)

- Allow binding params without type restrictions, used in "LIMIT ?, ?".

v0.1.1 (2015-09-17)

- Added try catch for code example where right outer join not supported in SQLite.
- Added phpdoc
- Merged #4
- Added unittesting and made it work on Travis.
- Added support for group by clause.
- Reformatted config-files with comments.
- Double check that lastInsertId works.
- Adding debug mode to hide or display connection details when connect() fails.
- Added error reporting to testprograms in webroot.
- Added utility `webroot/check_driver.php` to see if and what PDO drivers are loaded.
- Merged issue #1 from Emil to include limit and offset and made it work with MySQL.

v0.1.0 (2014-04-17)

- Using and modifying class `CDatabase` from Anax-oophp and merging with same class from Lydia.
- Adding trait for `TSQLQueryBuilderBasic`.
- Adding `webroot` with testfiles for SQLite, MySQL and general SQLBuilder.
- Adding `composer.json` and publishing to Packagist as `mos/cdatabase`.

```
 .
..:  Copyright (c) 2013 - 2016 Mikael Roos, me@mikaelroos.se

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73% 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 ~518 days

Total

2

Last Release

3932d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cac244120f54c02a4fb3186b91323f3f0805dd9daefd0babeb4a82a19232faf?d=identicon)[mikael\_roos](/maintainers/mikael_roos)

---

Top Contributors

[![mosbth](https://avatars.githubusercontent.com/u/169550?v=4)](https://github.com/mosbth "mosbth (46 commits)")[![foikila](https://avatars.githubusercontent.com/u/5789404?v=4)](https://github.com/foikila "foikila (12 commits)")[![nuvalis](https://avatars.githubusercontent.com/u/4467675?v=4)](https://github.com/nuvalis "nuvalis (4 commits)")[![adamgeorgsson](https://avatars.githubusercontent.com/u/2567087?v=4)](https://github.com/adamgeorgsson "adamgeorgsson (1 commits)")

---

Tags

frameworkmicromvcmoduleeducation

### Embed Badge

![Health badge](/badges/mos-cdatabase/health.svg)

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

PHPackages © 2026

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