https://github.com/komputronika/simpledb
Simple MySQLi wrapper to handle common database queries and operations.
https://github.com/komputronika/simpledb
library mysql mysqli php
Last synced: 2 months ago
JSON representation
Simple MySQLi wrapper to handle common database queries and operations.
- Host: GitHub
- URL: https://github.com/komputronika/simpledb
- Owner: komputronika
- License: gpl-3.0
- Created: 2016-08-22T06:13:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T03:48:57.000Z (almost 7 years ago)
- Last Synced: 2025-12-27T14:10:58.605Z (6 months ago)
- Topics: library, mysql, mysqli, php
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleDB #
SimpleDB is MySQLi wrapper to handle common database queries and operations.
**Include file:**
```php
id, $d->name
";
}
```
**Insert example:**
```php
$a = array();
$a['name'] = db_filter($_POST["name"]);
$a['age'] = db_filter($_POST["age"]);
db_insert("student", $a);
```
**Update example:**
```php
$a = array();
$a['name'] = "John Doe";
$a['age'] = 21;
db_update("student", $a, "id=10");
```
**Delete example:**
```php
db_delete("student", "id=5");
```
**Get last insert id:**
```php
//...
db_insert("student", $a);
$last_id = db_last_id();
```