1. Go to this page and download the library: Download derilkillms/pdo-orm 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/ */
$users = $DB->get_records_sql("SELECT * FROM {users} where city=?",array('ciamis')); //for get rows data
$user = $DB->get_record_sql("SELECT * FROM {user} where id=?",array(1)); // for get row data / one data
$user = $DB->execute("DELETE FROM {user} WHERE id=?",array(1)); // for execute query like insert update delete
//intialize key and value with object
$data = new stdClass();
$data->name = 'test';
$data->value = 'test';
//insert record
$insert = $DB->insert_record('table', $data);
$data = new stdClass();
$data->id = 1; //id params is important for update
$data->name = 'tests';
$data->value = 'tests';
//update record
$update = $DB->update_record('table', $data);
//delete record
$delete = $DB->delete_record('table','id=?',array(7));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.