PHP code example of rahisi / rahisi-db
1. Go to this page and download the library: Download rahisi/rahisi-db 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/ */
rahisi / rahisi-db example snippets
ahisi\RahisiDb\DB;
// selecting
DB::table("accounts")->where(["id" => 1])->get() //this will select * from accounts where id = 1
// inserting
DB::table("accounts")->insert(["id" => 1]) //this will INSERT INTO accounts set ("id") value (1)
// Updating
DB::table("accounts")->Update(["name" => "josh"])->where(['id'=>1])->save() //this will UPDATE accounts SET `name`="josh" where id=1