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

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

webmgine/database-object
========================

Simple custom PHP mysql/mariaDb object

1.0.2(6y ago)133MITPHPPHP &gt;=7.0.0

Since Feb 17Pushed 6y agoCompare

[ Source](https://github.com/webmgauthier/Webmgine-DatabaseObject)[ Packagist](https://packagist.org/packages/webmgine/database-object)[ RSS](/packages/webmgine-database-object/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (4)Used By (0)

Webmgine - DatabaseObject
=========================

[](#webmgine---databaseobject)

Simple custom PHP mysql/mariaDb object

Getting Started
---------------

[](#getting-started)

Use composer autload (or include **src/DatabaseObject.php** in your project).

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

```

Create database object instance

```
$databaseInfo = [
    'host' => 'database host',
    'name' => 'database name',
    'user' => 'database user',
    'pass' => 'database pass',
    'port' => 3306, // Optional, default = 3306
    'encoding' => 'UTF8' // Optional, default = 'UTF8',
    'prefix' => '' // Optional, default = '', used to prefix tables in a shared database environment
];
$dbo = new Webmgine\DatabaseObject($databaseInfo);

```

If you set a prefix, use **\#\_\_** in front of your table name when writing query.

```
$dbo->from('#__table_name'); // #__ will be replaced by your prefix, with default prefix set, #__table_name will become table_name

```

You can change the **\#\_\_** for anything else using **setPrefixTarget** method

```
$dbo->setPrefixTarget('!!!_');

```

Query are saved inside the object, remember to empty the saved values before making a new query

```
$dbo->newQuery();

```

Select query
------------

[](#select-query)

Exemple:

```
$dbo->newQuery();
$dbo->select('*');
$dbo->from('#__exemple_table');
$dbo->where('demo=:demo');
$dbo->execute([
    'demo' => $demo
]);
$singleResult = $dbo->getResult(); // Return one result, if many, return the first
$resultsArray = $dbo->getResults(); // Return all results in a array

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~88 days

Total

3

Last Release

2515d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47616936?v=4)[webmgauthier](/maintainers/webmgauthier)[@webmgauthier](https://github.com/webmgauthier)

---

Top Contributors

[![webmgauthier](https://avatars.githubusercontent.com/u/47616936?v=4)](https://github.com/webmgauthier "webmgauthier (12 commits)")[![mgauthiereffenti](https://avatars.githubusercontent.com/u/53188104?v=4)](https://github.com/mgauthiereffenti "mgauthiereffenti (2 commits)")

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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