PHPackages                             oussemakhlifi/orm-package - 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. oussemakhlifi/orm-package

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

oussemakhlifi/orm-package
=========================

This a native php orm package that works with mysql it's main objectif is to facilitate the crud process in your application, contains all crud opreations like (insert, edit, update, delete, soft\_delete) as well search operation

01PHP

Since Aug 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/oussemakh1/orm-package)[ Packagist](https://packagist.org/packages/oussemakhlifi/orm-package)[ RSS](/packages/oussemakhlifi-orm-package/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

orm-package
===========

[](#orm-package)

This a native php orm package that works with mysql it's main objectif is to facilitate the crud process in your application, contains all crud opreations like (insert, edit, update, delete, soft\_delete) as well search operation

setup
=====

[](#setup)

1- composer require oussemakhlifi/orm-package
2- setup your .env file with following varibales

- **db\_host** = "host"
- **db\_username** = "database username"
- **db\_password** = "database password"
- **db\_name** = "database name"

usage
=====

[](#usage)

**insert example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $columns = ["name", "category", "price"];

 $values = ["samsung a21", "phone", "1500"];

 $insert = $db->insert($table_name, $columns, $values);

```

**select example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $where = "id";

 $value = 1;

 $orderby = "id";

 $option = "desc";

 $select = $db->select($table_name, $where, $value, $orderby, $option);

```

**select by operator example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $column = "price";

 $operation = "=";

 $value = 1500;

 $orderby = "id";

 $option = "desc";

 $select = $db->selectByOperator($table_name, $column, $operation, $value, $orderby, $option);

```

**update example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $where = "id";

 $where_value = "1";

 $columns = ["name", "category", "price"];

 $values = ["samsung a22", "phone", "1000"];

 $update = $db->update($table_name, $columns,$where, $where_value, $values);

```

**delete example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $column = "id";

 $value = "1";

 $delete = $db->delete($table_name, $colum, $value);

```

**soft delete example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $column = "id";

 $value = "1";

 $soft_delete = $db->soft_delete($table_name, $colum, $value);

```

**search example**:

```
 $db = new \MysqlDB\MysqlDB();

 $table_name = "products";

 $column = "category";

 $value = "phone";

 $search = $db->search($table_name, $column, $value);

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46871935?v=4)[Oussema Khlifi](/maintainers/oussemakh1)[@oussemakh1](https://github.com/oussemakh1)

---

Top Contributors

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

---

Tags

mysql-databaseorm-libraryphpphp-library

### Embed Badge

![Health badge](/badges/oussemakhlifi-orm-package/health.svg)

```
[![Health](https://phpackages.com/badges/oussemakhlifi-orm-package/health.svg)](https://phpackages.com/packages/oussemakhlifi-orm-package)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.8k117.8M121](/packages/jdorn-sql-formatter)[backup-manager/backup-manager

A framework agnostic database backup manager with user-definable procedures and support for S3, Dropbox, FTP, SFTP, and more with drivers for popular frameworks.

1.7k1.6M11](/packages/backup-manager-backup-manager)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M88](/packages/propel-propel1)[insolita/yii2-migration-generator

Set of gii tools for generating files for migration by schema of table , phpdoc or table data

108508.0k5](/packages/insolita-yii2-migration-generator)[xpdo/xpdo

A PDO-based Object/Relational Bridge Library

7088.4k4](/packages/xpdo-xpdo)[voku/session2db

A PHP library acting as a wrapper for PHP's default session handling functions which stores data in a MySQL database, providing both better performance and better security and protection against session fixation and session hijacking.

2920.0k](/packages/voku-session2db)

PHPackages © 2026

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