PHPackages                             syamsoul/php-db-wow - 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. syamsoul/php-db-wow

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

syamsoul/php-db-wow
===================

This package will make your life easier in handling MySQL database.

2.0.0(3y ago)021MITPHPPHP &gt;=5.5.0

Since May 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/syamsoul/php-db-wow)[ Packagist](https://packagist.org/packages/syamsoul/php-db-wow)[ RSS](/packages/syamsoul-php-db-wow/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (8)Used By (0)

PHP DB Wow
==========

[](#php-db-wow)

[![Latest Version on Packagist](https://camo.githubusercontent.com/acdbeb3adacaea8bcbf760938f9f13a60592f95ab78a4c0f6e24206121899ecb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7379616d736f756c2f7068702d64622d776f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syamsoul/php-db-wow)

Documentation, Installation and Usage Instructions
--------------------------------------------------

[](#documentation-installation-and-usage-instructions)

See the [documentation](https://info.souldoit.com/projects/php-db-wow) for detailed installation and usage instructions.

Introduction
------------

[](#introduction)

This package will make your life easier in handling MySQL database.

- [Requirement](#requirement)
- [Installation](#installation)
- [Usage &amp; Reference](#usage--reference)
- [How to use it?](#how-to-use-it)
- [Example](#example)

Requirement
-----------

[](#requirement)

- PHP version: 5.5.0 and above

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

[](#installation)

This package can be used in PHP 5.5 or higher. If you are using an older version of PHP, there's might be some problem. If there's any problem, you can [create new issue](https://github.com/syamsoul/php-db-wow/issues) and I will fix it as soon as possible.

You can install the package via composer:

```
composer require syamsoul/php-db-wow
```

Usage &amp; Reference
---------------------

[](#usage--reference)

\* Before you read this section, you can take a look [the example below](#example) to make it more clear to understand.

### How to use it?

[](#how-to-use-it)

First, you must add this line to your PHP file:

```
use SoulDoit\PhpDBWow\DB;
```

And then create a new DB instance:

```
$db = new DB($hostname, $db_name, $db_username, $db_password);
```

Which is:

- `$hostname` is a string of your server hostname, for example:

```
$hostname = 'localhost';

// or

$hostname = 'mysql.hostinger.my';
```

- `$db_name` is a string of your database name, for example:

```
$db_name = 'new_project_db';
```

- `$db_username` is a string of your MySQL's username, for example:

```
$db_username = 'root';
```

- `$db_password` is a string of your MySQL's password, for example:

```
$db_password = 'mypassword';
```

And that's it. Now you have a connection with database. Congrats!

Next step is how to run the sql queries. Just head off to the example section and I'm sure you'll understand.

Enjoy! :D

Example
-------

[](#example)

```
// Autoload files using the Composer autoloader.
require_once  __DIR__  .  '/vendor/autoload.php';

use SoulDoit\PhpDBWow\DB;

$db = new DB('localhost', 'test_blank', 'root', '');

// *******
// INSERT
// *******

$table="shoes";

$parameters = [
    "brand" => "Lee",
    "price" => 543.23
];

$result = $db->insert($table, $parameters);

if($result === false) echo "Failed";
else echo "Success! The inserted ID is ".$result;

// *******
// DELETE
// *******

$table="shoes";

$conditions = [
    "id" => 2,
];

if($db->delete($table, $conditions) === false) echo "Failed";
else echo "Success! The item is deleted";

// *******
// UPDATE
// *******

$table="shoes";

$conditions = [
    "id" => 3,
];

$parameters = [
    "brand" => "Puma",
];

if($db->update($table, $conditions, $parameters) === false) echo "Failed";
else echo "Success! The item is updated";

// *******
// SELECT SINGLE DATA
// *******

$table = "shoes";

$conditions = [
    "id" => 3,
];

$data = $db->select($table, $conditions)->first();

if($data === false) echo "Failed";
else {
    echo "Success! \n";
    echo "Return Data: " . $data['brand'];
}

// *******
// SELECT MULTIPLE DATA
// *******

$table = "shoes";

$conditions = [
    "is_for_sale" => 1,
];

$data = $db->select($table, $conditions)->get();

if($data === false) echo "Failed";
else {
    echo "Success! \n\n";

    echo "Return Data: \n";
    foreach($data as $key => $each_data){
        echo $key . "=" . $each_data["brand"] . "\n";
    }
}

// *******
// SELECT USING RAW QUERY
// *******

$raw_sql_query = "SELECT * FROM `shoes` ORDER BY `id` DESC";

$query = $db->execute($raw_sql_query);

if($query === false) echo "Failed";
else {
    echo "Success! \n\n";

    echo "Return Data: \n";
    foreach($query->get() as $key => $each_data){
        echo $key . "=" . $each_data["brand"] . "\n";
    }
}

// *******
// OTHERS RAW QUERY
// *******

$raw_sql_query = "INSERT INTO `shoes` (`brand`, `price`) VALUES ('Adidas', 432.43)";

if($db->execute($raw_sql_query) === false) echo "Failed";
else echo "Success!";
```

Support me
----------

[](#support-me)

If you find this package helps you, kindly support me by donating some BNB (BSC) to the address below.

```
0x364d8eA5E7a4ce97e89f7b2cb7198d6d5DFe0aCe

```

 [![](https://camo.githubusercontent.com/67c5326d8855725c2e2fe63a03bbb2dbd6efed10e1fda2c02c20af0a041a2a72/68747470733a2f2f696e666f2e736f756c646f69742e636f6d2f696d672f77616c6c65742d616464726573732d626e622d6273632e706e67)](https://camo.githubusercontent.com/67c5326d8855725c2e2fe63a03bbb2dbd6efed10e1fda2c02c20af0a041a2a72/68747470733a2f2f696e666f2e736f756c646f69742e636f6d2f696d672f77616c6c65742d616464726573732d626e622d6273632e706e67)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Recently: every ~0 days

Total

7

Last Release

1240d ago

Major Versions

1.1.4 → 2.0.02022-12-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/605123f58f21c062a28a90d9db68fc30a26bc4b4016b35cb9787ae4e0c847a40?d=identicon)[syamsoul](/maintainers/syamsoul)

---

Top Contributors

[![syamsoul](https://avatars.githubusercontent.com/u/15118790?v=4)](https://github.com/syamsoul "syamsoul (18 commits)")

---

Tags

phpdatabasemysqldbwowsyamsoulc

### Embed Badge

![Health badge](/badges/syamsoul-php-db-wow/health.svg)

```
[![Health](https://phpackages.com/badges/syamsoul-php-db-wow/health.svg)](https://phpackages.com/packages/syamsoul-php-db-wow)
```

###  Alternatives

[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k22.9k](/packages/clouddueling-mysqldump-php)[stefangabos/zebra_database

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

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

Pop Db Component for Pop PHP Framework

1814.6k11](/packages/popphp-pop-db)

PHPackages © 2026

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