PHP code example of awethemes / database
1. Go to this page and download the library: Download awethemes/database 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/ */
awethemes / database example snippets
use Awethemes\Database\Database;
$builder = Database::newQuery()->select( '*' )->from( 'posts' );
var_dump( $posts = $builder->get() );
var_dump( $builder->toSql() ); // select * from `{$wpdb->posts}`
$posts = Database::table( 'posts' )->get();