PHPackages                             sharpedge/cruder - 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. sharpedge/cruder

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

sharpedge/cruder
================

php database connection and crud application made easy

v1.0.6(4y ago)09MITPHPPHP &gt;=5.3.0

Since Aug 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/husnain/cruder)[ Packagist](https://packagist.org/packages/sharpedge/cruder)[ RSS](/packages/sharpedge-cruder/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

cruder
======

[](#cruder)

*Cruder* is Simple libaray to perform all your database functions. it is very easy as ABC

###### It is still under development and the community is welcome to add their functions

[](#it-is-still-under-development-and-the-community-is-welcome-to-add-their-functions)

using this library, you can perform certain mysql functions like

- Select
    - Select with limit
    - Select with Offset
    - Select specific columns
- Insert
    - Insert as an array (forget about queries)

*Example of Select*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $cruder->table('employees');
  $result = $cruder->getAll();
```

*Select specific columns*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $select = array('emp_no', 'dept_no');
  $cruder->table('employees');
  $cruder->select($select);

  $result = $cruder->getAll();
```

*Select with Limit*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $cruder->table('employees');
  $cruder->limit(50);
  $result = $cruder->getAll();
```

*Select with Limit and offset*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $cruder->table('employees');
  $cruder->offset(1);
  $cruder->limit(50);
  $result = $cruder->getAll();
```

- Raw Select query\*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $query = "SELECT * FROM table_name";
  $result = $cruder->raw($query);
```

*Select with WHERE*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  //WHERE has to be an array
  $cruder->table('employees')->where(array('emp_no', '=', 500000));
  $result = $cruder->getAll();
```

*Even the insert is very easy:*

```
  use Cruder\Sharp\SharpCrud as Cruder;
  $cruder = Cruder::getInstance('localhost', 'root', '', 'employees');
  $cruder->table('employees');
  $insert = array('emp_no' => '500000', 'birth_date' => '1992-01-21', 'first_name'=> "husnain", "last_name" => 'ahmed', 'gender' => 'M', 'hire_date' => '2001-04-02');
  $insert_return = $cruder->insert($insert); // it will return the inserted ID

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.5% 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 ~2 days

Total

7

Last Release

1724d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1da42181704533569e87d1a5a762f9f4fc4eae9b2ddf48244e9bbda59a230461?d=identicon)[sharpcheck](/maintainers/sharpcheck)

---

Top Contributors

[![husnainso](https://avatars.githubusercontent.com/u/32506007?v=4)](https://github.com/husnainso "husnainso (13 commits)")[![husnain](https://avatars.githubusercontent.com/u/3172085?v=4)](https://github.com/husnain "husnain (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sharpedge-cruder/health.svg)

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

###  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.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/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)
