Project

General

Profile

« Previous | Next » 

Revision 1662

Added by darkviper over 12 years ago

added new getter 'getQueryCount' in class database

View differences:

class.database.php
42 42
	private $error      = '';
43 43
	private $error_type = '';
44 44
	private $message    = array();
45
	private $iQueryCount= 0;
45 46

  
46 47

  
47 48
	// Set DB_URL
......
84 85
	
85 86
	// Run a query
86 87
	function query($statement) {
88
		$this->iQueryCount++;
87 89
		$mysql = new mysql();
88 90
		$mysql->query($statement);
89 91
		$this->set_error($mysql->error());
......
97 99
	// Gets the first column of the first row
98 100
	function get_one( $statement )
99 101
	{
102
		$this->iQueryCount++;
100 103
		$fetch_row = mysql_fetch_array(mysql_query($statement) );
101 104
		$result = $fetch_row[0];
102 105
		$this->set_error(mysql_error());
......
138 141
		switch ($sPropertyName):
139 142
			case 'db_handle':
140 143
			case 'DbHandle':
144
			case 'getDbHandle':
141 145
				$retval = $this->db_handle;
142 146
				break;
143 147
			case 'db_name':
144 148
			case 'DbName':
149
			case 'getDbName':
145 150
				$retval = $this->db_name;
146 151
				break;
152
			case 'getQueryCount':
153
				$retval = $this->iQueryCount;
154
				break;
147 155
			default:
148 156
				$retval = null;
149 157
				break;

Also available in: Unified diff