PHP code example of syde / dbal
1. Go to this page and download the library: Download syde/dbal 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/ */
syde / dbal example snippets
use Syde\Dbal\Dbal;
// Select all events
$resultSet = Dbal::select('events')->all();
// Insert a record
$result = Dbal::writeOn('events')->insert([
'post_id' => 1,
'title' => 'My Event',
'status' => 'SCHEDULED',
'type' => 'party',
]);
// Delete a record
Dbal::deleteFrom('events')->where(['id' => 1]);