1. Go to this page and download the library: Download gin0115/pixie-wpdb 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/ */
# Basic setup
// Access the global WPDB or a custom instance for additional tables.
global $wpdb;
// Configure the builder and/or internal WPDB instance
$connection_config = [Connection::PREFIX => 'gin0115_'];
// Give a *single* Alias
$builder_alias = 'Gin0115\\DB';
new Connection( $wpdb, $connection_config, $builder_alias );
// Create the connection early on.
$connection = new Connection($wpdb, $config, 'Alias');
// Insert some data to bar.
Alias::table('bar')->insert(['column'=>'value']);
// Create connection and builder instance.
$connection = new Connection($wpdb, $config);
$qb = new QueryBuilderHandler($connection);
$query = $qb->table('my_table')->where('name', '=', 'Sana');
$results = $query->get();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.