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

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

steinhaug/mysqli
================

Mysqli Abstraction Layer

v1.9.1(10mo ago)0281proprietaryPHPPHP &gt;=8.0.0CI passing

Since Nov 9Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/steinhaug/mysqli)[ Packagist](https://packagist.org/packages/steinhaug/mysqli)[ Docs](https://gitlab.com/steinhaug/mysqli)[ Fund](https://steinhaug.com/donate/)[ RSS](/packages/steinhaug-mysqli/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (12)Used By (1)

Mysqli2
=======

[](#mysqli2)

Mysqli Abstraction Layer v1.9.0

Table of Contents
=================

[](#table-of-contents)

- [Mysqli2](#mysqli2)
- [Table of Contents](#table-of-contents)
- [1. Description](#1-description)
- [2. Version History](#2-version-history)
    - [2.1 Log](#21-log)
        - [v1.9.1](#v191)
        - [v1.9.0](#v190)
        - [V1.7.0](#v170)
        - [v1.6.6](#v166)
        - [v1.6.5](#v165)
        - [v1.6.4](#v164)
        - [v1.6.3](#v163)
        - [v1.6.2](#v162)
- [3. Install by composer](#3-install-by-composer)
- [5. Information](#5-information)
    - [5.1 License](#51-license)
    - [5.2 Author](#52-author)

1. Description
==============

[](#1-description)

Mysqli2 is an enhanced wrapper around PHP's native MySQLi extension that provides simplified prepared statement execution, better error handling, and development/production mode switching. The class extends mysqli, inheriting all native MySQLi methods while adding streamlined functionality.

**Key Features**

- **Singleton Pattern**: Single database connection instance
- **Development/Production Modes**: Configurable error reporting
- **Simplified Prepared Statements**: Streamlined syntax for common operations
- **Smart Return Values**: Context-aware return types based on SQL operation
- **Exception Handling**: Optional exception throwing with detailed error information

2. Version History
==================

[](#2-version-history)

2.1 Log
-------

[](#21-log)

### v1.9.1

[](#v191)

```
- Updated documentation.
- Added new methods for better handling of prepared statements and result sets.
- Improved error handling and logging.

```

### v1.9.0

[](#v190)

```
- Ny refaktorert klasse, nye metoder. Se docs/mysqli2_documentation-v1.9.md

```

### V1.7.0

[](#v170)

```
- Breaking file into smaller files, better readability.

```

### v1.6.6

[](#v166)

```
- Updated readme.

```

### v1.6.5

[](#v165)

```
- Bugfix, error_number has to be int

```

### v1.6.4

[](#v164)

```
- buddy() updated, has prepared output aswell. echo $mysqli->buddy('table','insert','prepared');
- parse_col_type, added prepared for type

```

### v1.6.3

[](#v163)

```
- Added mode for ->result('assoc') without using second parameter.

```

### v1.6.2

[](#v162)

```
- Updated for PHP 8.1

```

3. Install by composer
======================

[](#3-install-by-composer)

To install the old deprecated library use composer:

```
composer require "steinhaug/mysqli":"~1.6."

// documentation:
docs/mysqli2-documentation-v1.6.md

```

To install the library use composer:

```
composer require "steinhaug/mysqli":"^1.9.0"

// documentation:
docs/mysqli2_documentation-v1.9.md

```

Dump autoloaders:

```
composer dump-autoload --optimize

```

5. Information
==============

[](#5-information)

5.1 License
-----------

[](#51-license)

This project is licensed under the terms of the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Enjoy!

5.2 Author
----------

[](#52-author)

Kim Steinhaug, steinhaug at gmail dot com.

**Sosiale lenker:**[LinkedIn](https://www.linkedin.com/in/steinhaug/), [SoundCloud](https://soundcloud.com/steinhaug), [Instagram](https://www.instagram.com/steinhaug), [Youtube](https://www.youtube.com/@kimsteinhaug), [X](https://x.com/steinhaug), [Ko-Fi](https://ko-fi.com/steinhaug), [Github](https://github.com/steinhaug), [Gitlab](https://gitlab.com/steinhaug)

**Generative AI lenker:**[Udio](https://www.udio.com/creators/Steinhaug), [Suno](https://suno.com/@steinhaug), [Huggingface](https://huggingface.co/steinhaug)

**Resurser og hjelpesider:**[Linktr.ee/steinhaugai](https://linktr.ee/steinhaugai), [Linktr.ee/stainhaug](https://linktr.ee/stainhaug), [pinterest/steinhaug](https://no.pinterest.com/steinhaug/), [pinterest/stainhaug](https://no.pinterest.com/stainhaug/)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance54

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

Total

11

Last Release

320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de225214304bb0bec99d1677c7eb3246d556fa815ae57bdc423e638a931110ab?d=identicon)[steinhaug](/maintainers/steinhaug)

---

Top Contributors

[![steinhaug](https://avatars.githubusercontent.com/u/249419?v=4)](https://github.com/steinhaug "steinhaug (44 commits)")

---

Tags

databasemysqliprepared statments

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[aplus/database

Aplus Framework Database Library

3331.6M7](/packages/aplus-database)[sergeytsalkov/meekrodb

The Simple PHP/MySQL Library

341387.0k10](/packages/sergeytsalkov-meekrodb)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86946.7k](/packages/ezsql-ezsql)[jv2222/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

87311.3k2](/packages/jv2222-ezsql)[stefangabos/zebra_session

A drop-in replacement for PHP's default session handler which stores session data in a MySQL database, providing better performance, better security and protection against session fixation and session hijacking

174112.1k2](/packages/stefangabos-zebra-session)[stefangabos/zebra_database

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

11812.0k](/packages/stefangabos-zebra-database)

PHPackages © 2026

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