Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   1  <?php
   2  
   3  // security - hide paths
   4  if (!defined('ADODB_DIR')) die();
   5  
   6  class perf_sqlite3 extends adodb_perf{
   7  
   8  	 var $tablesSQL = "SELECT * FROM sqlite_master WHERE type='table'";
   9  
  10  	 var $createTableSQL = "CREATE TABLE adodb_logsql (
  11  	 	 created datetime NOT NULL,
  12  	 	 sql0 varchar(250) NOT NULL,
  13  	 	 sql1 text NOT NULL,
  14  	 	 params text NOT NULL,
  15  	 	 tracer text NOT NULL,
  16  	 	 timer decimal(16,6) NOT NULL
  17  	 	 )";
  18  
  19  	 var $settings = array();
  20  
  21  	function __construct(&$conn)
  22  	 {
  23  	 	 $this->conn = $conn;
  24  	 }
  25  
  26  	function tables($orderby='1')
  27  	 {
  28  	 	 if (!$this->tablesSQL){
  29  	 	 	 return false;
  30  	 	 }
  31  
  32  	 	 $rs = $this->conn->execute($this->tablesSQL);
  33  	 	 if (!$rs) {
  34  	 	 	 return false;
  35  	 	 }
  36  
  37  	 	 $html = rs2html($rs, false, false, false, false);
  38  	 	 return $html;
  39  	 }
  40  }