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

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

litto/mysqli-lib
================

CRUD Function Library based on Mysqli for PHP applications

v1.0(4y ago)03proprietaryPHPPHP &gt;=5.3.6

Since Feb 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/litto/mysqli-lib)[ Packagist](https://packagist.org/packages/litto/mysqli-lib)[ RSS](/packages/litto-mysqli-lib/feed)WikiDiscussions main Synced 1mo ago

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

MYSQLI Library
==============

[](#mysqli-library)

Mysqli Library for CRUD Functions

When you do a project in php related to web, the main thing you have to came across is the management of database.This all functions including,connecting to database,retreiving values from databse,deleting,updating,inserting....etc.. so by including the library file iam providing below, you can just call that functions in your code and do all operations very fast without manually writing functions again and again:-

How to Install?
---------------

[](#how-to-install)

Install the Library via composer using:-

composer require litto/mysqli-lib:v1.0

Folder Structure
----------------

[](#folder-structure)

-config.php // including connection variables which will be autoloading by the Mysql libraries and classes -autoload.php // autoload classes by declaration from libs library -demo.php // demo on how to initilise and call each functions -/libs // folder for saving all lib files

How it Works?
-------------

[](#how-it-works)

1. Zip the package to your Website root
2. Make sure config.php, autoload.php files are in root and libs folder contains Mysql.php library file
3. Now in your file include both config an autoload files.
4. In config.php file, please update your db credentials
5. Now we have to create library files for your database tables by defining library functions extending Mysql

for eg:- If you have a cms\_user table, for defining functions for DB transactions for this table define library like this.

$inputs\['name'\],'tel'=&gt;$inputs\['tel'\],'email'=&gt;$inputs\['email'\]); $this-&gt;insert($insert,"cms\_user"); return true; } //Update Record function updateContent($inputs){ $insert = array( 'name'=&gt;$inputs\['name'\],'tel'=&gt;$inputs\['tel'\],'email'=&gt;$inputs\['email'\]); $this-&gt;update($insert,"cms\_user",'`id`='.$inputs\['id'\]); return true; } //Get all records function getall(){ $query = 'SELECT \* FROM `cms\_user` '; $rec = $this-&gt;fetchAll($query); return $rec; } //Get details of Record function getrecord($id){ $query = 'SELECT \* FROM `cms\_user` WHERE `id`='.$id.' '; $rec = $this-&gt;fetchAll($query); return $rec; } //Delete record function deleterecord($id){ $this-&gt;delete('cms\_user','`id`='.$id); } } ?&gt; 6. Now For calling these Function , suppose in your index.php file..

You just have to intilize it like:-

$obj=new User(); $records=$obj-&gt;getall();

or $record=$obj-&gt;getdetails($id);

Like this you can call, all the functions defined...

7. Make class files for all the tables you need..

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

1553d ago

### Community

Maintainers

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

---

Top Contributors

[![litto](https://avatars.githubusercontent.com/u/941390?v=4)](https://github.com/litto "litto (8 commits)")

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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