File: perf-sqlite3.inc.php

package info (click to toggle)
libphp-adodb 5.22.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,288 kB
  • sloc: php: 35,668; xml: 80; sql: 32; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

// security - hide paths
if (!defined('ADODB_DIR')) die();

class perf_sqlite3 extends adodb_perf{

	var $tablesSQL = "SELECT * FROM sqlite_master WHERE type='table'";

	var $createTableSQL = "CREATE TABLE adodb_logsql (
		created datetime NOT NULL,
		sql0 varchar(250) NOT NULL,
		sql1 text NOT NULL,
		params text NOT NULL,
		tracer text NOT NULL,
		timer decimal(16,6) NOT NULL
		)";

	var $settings = array();

	function __construct(&$conn)
	{
		$this->conn = $conn;
	}

	function tables($orderby='1')
	{
		if (!$this->tablesSQL){
			return false;
		}

		$rs = $this->conn->execute($this->tablesSQL);
		if (!$rs) {
			return false;
		}

		$html = rs2html($rs, false, false, false, false);
		return $html;
	}
}