Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ICWR-TEAM/R-CRUD
Rusher CRUD ( PHP )
https://github.com/ICWR-TEAM/R-CRUD
Last synced: about 1 month ago
JSON representation
Rusher CRUD ( PHP )
- Host: GitHub
- URL: https://github.com/ICWR-TEAM/R-CRUD
- Owner: ICWR-TEAM
- License: mit
- Created: 2021-03-04T11:24:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-17T03:11:53.000Z (about 3 years ago)
- Last Synced: 2024-08-02T20:46:38.100Z (4 months ago)
- Language: PHP
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-indo-projects - R_CRUD - CRUD PHP Plugins. Fungsi CRUD untuk mempermudah scripting yang berhubungan dengan CRUD. (PHP)
- awesome-indonesia-repo - R_CRUD - CRUD PHP Plugins. Fungsi CRUD untuk mempermudah scripting yang berhubungan dengan CRUD. (PHP)
README
# R-CRUD
Rusher CRUD ( PHP )##
### Simple UseInclude this plugins
```php
include('r-crud.php');
```Create variable function
```php
$func = New r_crud($connection);
```How to create data
```php
$table = 'table';
$data = [
"column1" => $value1,
"column2" => $value2,
"column3" => $value3
];
$func->data_create($table, $data);
```How to read data
```php
$table = 'table';
$raw_data = $func->data_read_all($table);foreach($raw_data as $id => $data) {
echo $id . " -> " . $data['column'];
}
```How to read data by "WHERE" query
```php
$table = 'table';
$where = [
"id" => 1
];
$data = $func->data_read_where($table, $where);
echo $data['column'];
```How to update data
```php
$table = 'table';
$where = [
"id" => 1
];
$data_update = [
'column1' => $value1,
'column2' => $value2
];
$func->data_update($table, $data_update, $where);
```How to delete data
```php
$table = 'table';
$where = [
"id" => 1
];
$func->data_delete($table, $where);
```