Class mysql

Description

Handles database-related functions

  • author: Abdul Al-Hasany
  • version: 2010
  • copyright: Abdul Al-hasany (c) 2010
  • access: public

Located in /includes/mysql.class.php (line 42)


	
			
Direct descendents
Class Description
sessions This class sessions in DiY-CMS. The class extends to mysql class
Variable Summary
mixed $dbconntype
mixed $dbname
mixed $dbpword
mixed $dbserver
mixed $dbuser
mixed $link
mixed $queryNum
mixed $query_echo
mixed $result
Method Summary
null mysql ()
null close ()
null connect ()
array dbarray (mixed $result)
array dbfetch (mixed $query)
int dbnumquery (mixed $table, [string $where = ""], [string $field = ''])
integer dbnumrows ([string $ret = ""])
int insertid ()
null print_error ([string $err = ""])
void query (mixed $query, [booalen $repair = ''])
Variables
mixed $dbconntype = '' (line 45)
mixed $dbname = '' (line 48)
mixed $dbpword = '' (line 47)
mixed $dbserver = '' (line 44)
mixed $dbuser = '' (line 46)
mixed $link = null (line 49)
mixed $queryNum = 0 (line 50)
mixed $query_echo (line 52)
mixed $result = false (line 51)
Methods
Constructor mysql (line 59)

Constructor: load database configurations and connect to the database

  • return: connect to database
null mysql ()
close (line 103)

Close mysql connection

null close ()
connect (line 75)

Connect to database

  • return: function will connect to database
null connect ()
dbarray (line 144)

add query results to an array

  • return: results array
array dbarray (mixed $result)
  • mixed $result: results
dbfetch (line 155)

query database and return results in an array

  • return: results array
array dbfetch (mixed $query)
  • mixed $query: Query to be proccessed
dbnumquery (line 185)

count rows number in a query given by $tabel, $where and $field

  • return: number of results
int dbnumquery (mixed $table, [string $where = ""], [string $field = ''])
  • mixed $table: table in the database to query
  • string $where: what to query
  • string $field: query scope
dbnumrows (line 168)

Count query rows number

  • return: Query rows number
integer dbnumrows ([string $ret = ""])
  • string $ret: Query rows to be counted
insertid (line 207)

retrive the id of the last row inserted

  • return: the id of the last row
int insertid ()
print_error (line 224)

print query error when it occurs

  • return: error message is printed
null print_error ([string $err = ""])
  • string $err: title message
query (line 119)

query the database

void query (mixed $query, [booalen $repair = ''])
  • mixed $query: Query to be sent to the database
  • booalen $repair: if set to true then the table will be repaied

Documentation generated on Fri, 16 Apr 2010 12:54:46 +1000 by phpDocumentor 1.4.1