PHPackages                             simplecrud/simplecrud - 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. simplecrud/simplecrud

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

simplecrud/simplecrud
=====================

A Simple CRUD Class to make your development process faster

291PHP

Since Dec 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Kofacts/Simple_CRUD)[ Packagist](https://packagist.org/packages/simplecrud/simplecrud)[ RSS](/packages/simplecrud-simplecrud/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple\_CRUD
============

[](#simple_crud)

A Simple Create,Read,Update,Delete Library for your PHP Web App. Basically, there wouldn't be any need to tinker with annoying Query Codes. Leverages Both MYSQLi and PDO.

How to use?
===========

[](#how-to-use)

With Composer
-------------

[](#with-composer)

First install Composer using

`composer install`

Then Require it using

`composer require scrud/scrud`

Which will then be added to your Composer.json dependencies.

Or

---------------- Using the lib as a Class ------
------------------------------------------------

[](#-----------------using-the-lib-as-a-class--------)

1. Clone this Repo which will then be stored in your chosen directory as Simple\_CRUD

` git clone https://github.com/kofacts/Simple_CRUD.git"`

2. Open the File
3. Locate the src/ directory and Open the config.php
4. Fill in the necessary details and DB\_Type. MYSQLI or PDO.

` 	$connectDetails=[			"hostname"=>"hostname",			"username"=>"username",			"password"=>"password",			"DB_NAME"=>"database name",			"connect_type"=>strtoupper("pdo or mysqli"),		];`5. Inside your Main Page, say index.php, instantiate a Scrud Object.

` $scrud= new Scrud;`

6. Now you Have done the needful, What can you do with all this.

Some of the Basic Methods you can use.
======================================

[](#some-of-the-basic-methods-you-can-use)

1. create($tablename,$fields) : The tablename is the name of the Tablename you wish to add Data to, while the fields are the array of data you wish to insert values into. From the code below, the user\_details is the tablename, while the array are yes, array of values you wish to insert data into.

`$scrud->create("user_details",array("username"=>"Ricesss","password"=>"pico4421ss")); `

2. get($tablename) : params is just $tablename. This would get all fields from DB. Simple instantiate the Scrud Class. eg

`$posts=$scrud->get("user_details");`

And then loop through all the fields.

`foreach($posts as $row)	{		echo $row['username'];	}`3. get\_where($tablename,$id,$value): This would accept params tablename,id/field and the value you wish to get. To use, simply do

`$value=$scrud->get_where($tablename,$id,$value)`And then use

`echo $value['username'];`

4. update($tablename,$field,$id,$value); This would accept params $tablename,$field \[arrays\],id to be update and value. To use, simply do,

`$scrud->update("user_details",array("username"=>"Rapheal","password"=>"skjf..anything"),"id",1);`

5. delete($tablename,$id,$value): This would accept params $tablename,$id to delete and then value. To Use, Simply do,

`$scrud->delete("user_details","id",2);`

Inspiration
===========

[](#inspiration)

The Concept is inspired by Codeigniter's Sleek Query System. Make it simple, and very simple has always been the name.

Contribute
==========

[](#contribute)

There are so many features that should be added to this platform. Hey, Don't just leave, you can always contribute by pulling a request.

This would Help Me, How should i thank you.
===========================================

[](#this-would-help-me-how-should-i-thank-you)

Nah, Nada, Don't thank Me. Actually, you can thank me by Staring. Em, 😄 I think that is just it.

**PS:** Some Basic Touches still going on.

Licence
=======

[](#licence)

MIT

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/35b22911b1bc03b9539a2d00dd69c660901d780fe44f0a5f1ba8e14062b0aa72?d=identicon)[Kofacts](/maintainers/Kofacts)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[faonni/module-price

Rounding Price to Prettier Value for Multi-Currency Stores.

63120.9k](/packages/faonni-module-price)[php-tuf/php-tuf

PHP implementation of The Update Framework (TUF)

456.5k1](/packages/php-tuf-php-tuf)[shdev/phpflashtext

A port of the flashtext python implementation

2030.7k](/packages/shdev-phpflashtext)[magefan/module-catalog

Fixes for magento issues in catalog

2314.0k](/packages/magefan-module-catalog)[webinarium/php-dictionary

Static dictionary implementation for PHP

1019.1k](/packages/webinarium-php-dictionary)

PHPackages © 2026

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