1. Go to this page and download the library: Download offworks/overnight 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/ */
$tickets = $db->from('ticket')
->where('available = ? AND used = ?', array(1, 0))
->where('expiry_date < ?', array('2020-10-10'))
->andWhere('seat_type = ?', array('single'))
->orWhere('master_ticket = ?', array(1))
->execute();
// will execute something like
SELECT * FROM ticket WHERE available = 1 AND used = 0 AND expiry_date < '2020-10-10' AND seat_type = 'single'
$users = $db->from('book')
->innerJoin('author ON author.author_id = book.author_id AND author.is_alive = ?', array(1))
->execute()->all();