PHPackages                             jasperfw/data-access - 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. jasperfw/data-access

ActiveLibrary

jasperfw/data-access
====================

Database Access Library

1.1.2(4y ago)01043Apache-2.0PHPPHP ^8.1CI failing

Since Feb 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jasperfw/data-access)[ Packagist](https://packagist.org/packages/jasperfw/data-access)[ RSS](/packages/jasperfw-data-access/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (8)Used By (3)

Jasper FW - Data Access
=======================

[](#jasper-fw---data-access)

The Data Access Library provides wrappers for interacting with MySQL, SQL Server, SQLite and more coming soon.

The included database connection wrappers mostly wrap PDO drivers. However, some drivers wrap alternative drivers (such as odbi for Oracle) where PDO support is not available or complete.

In addition to database connectivity, this library provides a set of ResultSet objects that wrap PDOStatment objects, arrays, or other data holders. These ResultSet objects can be used as prepared statements and storage objects for the results of queries against a wide variety of data sources with a simple, uniform interface.

Features
--------

[](#features)

- AIntegrate with popular database engines (MySQL and MS Server currently, partial DB2 support, more coming soon.)
- Simple Prepared Statement / result containers

Instructions
============

[](#instructions)

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

[](#installation)

Install using composer `composer require "jasperfw/data-access"`

Basic Usage
-----------

[](#basic-usage)

### Establish a database connection

[](#establish-a-database-connection)

1. Create a configuration array containing the database connection attributes

```
$config = [
    'server' => 'mysql://localhost:port', // This is your DSN string for most database types
    'username' => 'bob',
    'password' => 'myUniquePassword',
];
```

2. Instantiate a database connection object, passing in the $configuration array, and optionally a PSR-3 compliant logger, such as Monolog

```
$dbc = new MySQL($config, $logger);
```

### Query the database

[](#query-the-database)

1. Quickly query the database, and output the results as an array. The `query()` function accepts two parameters, the query string, and an options array, which can contain a 'params' element for a parameterized query:

```
$queryString = "SELECT * FROM users WHERE username = :username";
$myArray = $dbc->query($queryString, ['params' => [':username' => 'bob']])->toArray();
```

2. Use parameterized queries and Result Sets

```
$queryString = "SELECT * FROM order_lines WHERE productID = :pid";
$stmt = $dbc->getStatement($queryString);
$stmt->execute([':pid' => '12345']);
if ($stmt->querySucceeded()) {
    $resultArray = $stmt->toArray();
}
$stmt->execute([':pid' => '54321']);
if ($stmt->querySucceeded()) {
    $resultArray2 = $stmt->toArray();
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

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

Recently: every ~185 days

Total

6

Last Release

1521d ago

PHP version history (2 changes)1.0.0PHP ^7.2

1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e587f99865e86a6017790de670eddcc411174fca453eca382bdf03b65401837?d=identicon)[wigedev](/maintainers/wigedev)

---

Top Contributors

[![wigedev](https://avatars.githubusercontent.com/u/2421683?v=4)](https://github.com/wigedev "wigedev (19 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jasperfw-data-access/health.svg)

```
[![Health](https://phpackages.com/badges/jasperfw-data-access/health.svg)](https://phpackages.com/packages/jasperfw-data-access)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[flowwow/cloudpayments-php-client

cloudpayments api client

2188.2k](/packages/flowwow-cloudpayments-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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