PHPackages                             hexastudio/mysqli-wrapper - 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. hexastudio/mysqli-wrapper

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

hexastudio/mysqli-wrapper
=========================

Mysql database access class using mysqli

v1.5.0(9y ago)21.4k[1 issues](https://github.com/octa7th/Mysql-Database/issues)MITPHPCI failing

Since Mar 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/octa7th/Mysql-Database)[ Packagist](https://packagist.org/packages/hexastudio/mysqli-wrapper)[ RSS](/packages/hexastudio-mysqli-wrapper/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

Mysql Database Class
====================

[](#mysql-database-class)

A dead simple and powerfull mysqli wrapper for PHP to access mysql database. All you need is to call the file in your application. And create a new object using this Database class.

Features
--------

[](#features)

- Fetch data (SELECT) from tables using WHERE, WHERE IN, LIKE
- Support JOIN tables for SELECT data
- Use regex to SELECT data
- Insert new data
- Update existing data
- Delete / Remove data from table
- Escaping your query to prevent sqli
- Easy to configure and extend

How to use
----------

[](#how-to-use)

```
require 'database.php';

$host     = 'localhost';
$user     = 'root';
$password = 'password';
$db_name  = 'database_name';
$port     = 3306; // Optional

$db = new Database($host, $user, $password, $db_name, $port);

/**
 * Sample
 */
$db->where('state', 'Jakarta')
    ->sort('first_name', 'DESC')
    ->limit(0, 5)
    ->get('student');

// Equals to "SELECT FROM `student` WHERE `state` = 'Jakarta' ORDER BY `first_name` DESC LIMIT 0, 5;"
```

Change log
----------

[](#change-log)

- v1.1.0 :
    - Remove function check word
    - Add new static method mysql\_const
    - Add new method get\_total
- v1.2.0 :
    - Create new method clean\_null
    - Clean array data on method insert and update
- v1.3.0 :
    - Add tests using phpunit
- v1.3.1 :
    - Trigger error when there's a query error

Now i'm still working on API documentation on my website. Feel free to contribute.

License
-------

[](#license)

### The MIT License (MIT)

[](#the-mit-license-mit)

Copyright (c) 2014, Muhammad Sofyan &lt;&gt;

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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

Total

5

Last Release

3354d ago

### Community

Maintainers

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

---

Top Contributors

[![octa7th](https://avatars.githubusercontent.com/u/2761140?v=4)](https://github.com/octa7th "octa7th (85 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hexastudio-mysqli-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/hexastudio-mysqli-wrapper/health.svg)](https://phpackages.com/packages/hexastudio-mysqli-wrapper)
```

###  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)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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