Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdsaad13/crud-redbean
Examples of crud operation with classes using redbean ORM
https://github.com/mdsaad13/crud-redbean
bootstrap4 class crud crud-sample mdsaad13 oops php redbean redbeanphp
Last synced: 11 days ago
JSON representation
Examples of crud operation with classes using redbean ORM
- Host: GitHub
- URL: https://github.com/mdsaad13/crud-redbean
- Owner: mdsaad13
- Created: 2019-09-26T16:06:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-17T00:21:01.000Z (about 3 years ago)
- Last Synced: 2024-11-14T03:24:50.542Z (2 months ago)
- Topics: bootstrap4, class, crud, crud-sample, mdsaad13, oops, php, redbean, redbeanphp
- Language: PHP
- Size: 802 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crud-Redbean
Examples of crud operation with classes using redbean ORM
#### Step 1 : Include the class file
```php
require_once 'class.php';
```
#### Step 2 : Create object of class [Operations](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php#L17)
```php
$db = new Operations;
```
#### All detailed examples are in`examples branch`
# Some basic operations
- [insert](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php#L30) operation
```php
$db->insert(string 'table_name', array $array_of_fields_to_insert);
```- [update](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php#L49) operations
```php
$db->update(string 'tablename', array $array_containing_fields, int $id);
```- [delete](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php#L67) operations
```php
$db->delete(string 'tablename', int $id);
```- [select](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php#L81) operations
```php
$db->SelectByID(string 'tablename', int $id);
```
#### Refer [controllers/class.php](https://github.com/mdsaad13/Crud-Redbean/blob/a07d6135f698d8c236597420e13d40ce5b8e9aef/controllers/class.php) for more operations