PHPackages                             dboho/simple-database-api - 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. dboho/simple-database-api

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

dboho/simple-database-api
=========================

Simple API for Database Access

v0.7.4(5y ago)02371[3 issues](https://github.com/DavidWiesner/simple-database-api/issues)[2 PRs](https://github.com/DavidWiesner/simple-database-api/pulls)1MITPHPPHP ~5.5 || ~7.0

Since Mar 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/DavidWiesner/simple-database-api)[ Packagist](https://packagist.org/packages/dboho/simple-database-api)[ RSS](/packages/dboho-simple-database-api/feed)WikiDiscussions master Synced 4w ago

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

DBoho\\IO\\DataAccess
=====================

[](#dbohoiodataaccess)

[![Build Status](https://camo.githubusercontent.com/f75abe3f0c17e3aa2216f2ab68edfa17c417164530cb6958e3be499a11635dbe/68747470733a2f2f7472617669732d63692e6f72672f4461766964576965736e65722f73696d706c652d64617461626173652d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DavidWiesner/simple-database-api)[![Coverage Status](https://camo.githubusercontent.com/feb39eb55048d710cfc32098a9601c448b34853e4d46caa7dfbec04281aa58e9/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4461766964576965736e65722f73696d706c652d64617461626173652d6170692f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/DavidWiesner/simple-database-api?branch=master)

A simple API for Database Access

Features
--------

[](#features)

- Simple API
- prevent SQL injection with automatic whitelist column filter and pdo prepared statements

Install with Composer
---------------------

[](#install-with-composer)

```
$ composer require dboho/simple-database-api
```

Usage
-----

[](#usage)

```
# select
$result = $da->select('books', ['title'], ['author'=>'Rasmus Lerdorf']);
echo(json_encode($result));

# insert
$da->insert('books', ['title'=>'Using the New DB2', 'author'=>'Don Chamberlin']);

# update
$da->update('books', ['price'=>9.80], ['id'=>1023]);

# delete
$da->delete('books', ['id'=>1021]);
```

Automatic Whitelist Column Filter
---------------------------------

[](#automatic-whitelist-column-filter)

To prevent SQL injection all attributes that are used as column names will be filtered with a whitelist. This whitelist is build for each queried database table.

### Example

[](#example)

Books Table

**id****title****author****price**1Programming PHPRasmus Lerdorf39.99Whitelist for the books table will contain id, title, author and price.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

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

Total

2

Last Release

2176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/199908011217eac9c70d6f52f5417ea2ca132651a6e1db0dc798f926c6d4bb08?d=identicon)[dBoho](/maintainers/dBoho)

---

Top Contributors

[![DavidWiesner](https://avatars.githubusercontent.com/u/243115?v=4)](https://github.com/DavidWiesner "DavidWiesner (20 commits)")

---

Tags

apidatabaseSimple

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dboho-simple-database-api/health.svg)

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

###  Alternatives

[kreait/firebase-bundle

Symfony Bundle for the Firebase Admin SDK

1555.0M2](/packages/kreait-firebase-bundle)[aternus/geonames-client

GeoNames API Client

35222.8k2](/packages/aternus-geonames-client)[alvin0/database-json-laravel

Create and manage json databases with Laravel

344.5k](/packages/alvin0-database-json-laravel)[flightphp/active-record

Micro Active Record library in PHP, support chain calls, events, and relations.

163.6k11](/packages/flightphp-active-record)

PHPackages © 2026

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