/** * Execute built query * This will prepare query, bind params and execute query * * @return Statement */ public function execute() { if ($this->db === null) { $this->db = DB::getInstance(); } return $this->db->execQuery($this); }
* Index file * * @autor Hector Napal * @email hnapal@gmail.com * @github https://github.com/hnapal */ // INCLUDES include_once 'DB/DB.php'; include_once 'DB/Variables.php'; // >>> SET CONFIGURATION =============================================================================================== ignore_user_abort(true); set_time_limit(0); // Disable the time limit for this script // >>> EXECUTE QUERY =================================================================================================== $db = new DB(); $res = $db->execQuery(QUERY); ?> <!-- PREPARE HTML TABLE FOR RESULT --> <h2>Companies</h2> <table style="border: none;"> <tr> <td><strong>ID</strong></td> <td><strong>Name</strong></td> </tr> <?php // >>> DISPLAY RESULT ================================================================================================== foreach ($res as $ind => $fila) { // Get data