PHP code example of dboho / simple-database-api
1. Go to this page and download the library: Download dboho/simple-database-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dboho / simple-database-api example snippets
# select
$result = $da->select('books', ['title'], ['author'=>'Rasmus Lerdorf']);
echo(json_encode($result));
# insert
$da->insert('books', ['title'=>'Using the New DB2', 'author'=>'Don Chamberlin']);
# update
$da->update('books', ['price'=>9.80], ['id'=>1023]);
# delete
$da->delete('books', ['id'=>1021]);