PHPackages                             tox2ik/php-mysqli-aliases - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tox2ik/php-mysqli-aliases

ActiveUtility[Utility &amp; Helpers](/categories/utility)

tox2ik/php-mysqli-aliases
=========================

fetch-array, insert values, etc

1.1.7(7y ago)0537public-domainPHP

Since Jul 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tox2ik/php-mysqli-aliases)[ Packagist](https://packagist.org/packages/tox2ik/php-mysqli-aliases)[ RSS](/packages/tox2ik-php-mysqli-aliases/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (16)Used By (0)

php-mysqli-aliases
==================

[](#php-mysqli-aliases)

Not sure what the original authors were thinking in 2004, but I definetly don't want to write something like this just to fill a hash with records.

```
if ($db->query("INSERT INTO studends ... ;")) {
    if ($res = mysqli_insert_id($db)) {
        if ($qRes = $db->query("SELECT * FROM exam_results WHERE studint_id ...")) {
            while ($rec = mysqli_fetch_assoc($qRes)) {
                $rows[] = $rec
            }
        }
    }
}

```

This is acceptable:

```
if (qInsert('insert into students ...;')) {
    $rows = qAssocAll("SELECT * FROM exam_results WHERE studint_id ...");
}

```

Helpers
-------

[](#helpers)

```
qArrayAll()              - get array (hydrate: both)
qAssocAll()              - get array (hydrate: associative)
qArrayColumnAll()        - get all values of a single column
qArrayOne()              - get a single record
qAssocOne()              - get a single record (assoc)
qOne()                   - get a single record (assoc)
qEscape()                - escape ' and "
qExists()                - get a true boolean if a query produces results
qInsert()                - get the last inserted id after inserting
qInsertId()              - get the last inserted id without inserting anything
qLastId()                - get the last inserted id without inserting anything
qResult()                - query and get a result set
qPrep()                  - prepare a statement
qExecutePrepared()       - yep
qUpdate()                - get the number of affected rows
qVar()                   - get a single value
qError()                 - get last error

```

Features
--------

[](#features)

- reduces boilerplate
- supports mysqli and PDO with the same *interface*
- loggs all SQL errors to the `error_log` without `die()`
- returns `array` instead of `false`, empty or not.
- fetch one column as a flat list
- fetch a single value
- fetches in bulk (no while-fetch-one)
- returns the *raw* result object or resource if you need it

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

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

Recently: every ~64 days

Total

13

Last Release

2802d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a4ffba7465505327c5421e1b710cda21c3d856f91d438cb457d519b6b018895?d=identicon)[tox2ik](/maintainers/tox2ik)

---

Top Contributors

[![tox2ik](https://avatars.githubusercontent.com/u/890081?v=4)](https://github.com/tox2ik "tox2ik (5 commits)")

### Embed Badge

![Health badge](/badges/tox2ik-php-mysqli-aliases/health.svg)

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

PHPackages © 2026

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