1. Go to this page and download the library: Download wowoengine/sawitdb-php 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/ */
wowoengine / sawitdb-php example snippets
use SawitDB\Engine\WowoEngine;
$db = new WowoEngine(__DIR__ . '/plantation.sawit');
use SawitDB;
// In Controller
public function index() {
SawitDB::query("LAHAN users");
SawitDB::query("TANAM KE users (name) BIBIT ('Budi')");
return SawitDB::query("PANEN * DARI users");
}
use SawitDB\Engine\WowoEngine;
$db = new WowoEngine(__DIR__ . '/plantation.sawit');
// Generic SQL
$db->query("CREATE TABLE users");
$db->query("INSERT INTO users (id, name) VALUES (1, 'Budi')");
// AQL
$db->query("LAHAN trees");
$db->query("TANAM KE trees (id, type) BIBIT (1, 'Dura')");
// Join
$rows = $db->query("SELECT * FROM trees JOIN users ON trees.id = users.id");
print_r($rows);