go-database
[ class tree: go-database ] [ index: go-database ] [ all elements ]

Class: db

Source Location: /classes/database/mysql.class.inc.php

Class Overview

base_db
   |
   --db

Class that connects to MySQL using the MySQLi extension


Author(s):

Version:

  • $Id: imap.class.inc 1201 2008-10-22 18:23:34Z mschering $

Variables

Methods


Child classes:

GO_LINKS
Functions to create links between items in Group-Office
reminder
class to set reminders in Group-Office.
GO_USERS
This class is used to manage users in Group-Office.
GO_AUTH
Implementation of GroupOffice Authentication. This class provides the login-function for the Group-Office SQL database, which is the default authentication mechanism.
search
This class is used to search through all modules that support the __on_search function.
GO_MODULES
This class is used to install/remove modules and to access module information in other PHP scripts. This class is always available in $GO_MODULES.
GO_GROUPS
This class is used to manage user groups
GO_SECURITY
This file is used to manage access control lists (ACL).
smtp_restrict
This class restricts the number of outgoing messages to a SMTP host
filesystem
This class contains functions for filesytem operations

Inherited Variables

Inherited Methods

Class: base_db

base_db::__construct()
Constructor a config object with db_host, db_pass, db_user and db_name may be passed so it can connect to a different database then the default.
base_db::affected_rows()
Gets the number of affected rows in a previous MySQL operatio
base_db::connect()
Connnects to the database
base_db::escape()
Escapes a value to make it safe to send to MySQL
base_db::f()
Fetch a single field from a result record
base_db::found_rows()
Returns the number of rows found when you have used SELECT SQL_CALC_FOUND_ROWS
base_db::free()
Frees the memory associated with a result
base_db::halt()
Halts when an error occurs
base_db::insert_id()
Returns the auto generated id used in the last query
base_db::insert_row()
Inserts a row in a table
base_db::lock()
Lock a table
base_db::nextid()
Get a next unique ID for a table. Used instead of auto increment so that we have better support for different database backends.
base_db::next_record()
Walk the reseult set from a select query
base_db::num_fields()
Get the number of fields in a result
base_db::num_rows()
Return the number of rows found in the last select statement
base_db::p()
Print a single field from a result record.
base_db::query()
Queries the database
base_db::replace_row()
Replaces a row in a table
base_db::set_config()
Set's the connection parameters. A config object with db_host, db_pass, db_user and db_name may be passed so it can connect to a different database then the default.
base_db::set_error()
Sets the error and errno property
base_db::set_parameters()
Set the connection parameters manually
base_db::unlock()
Unlock tables
base_db::update_row()
Updates a row from a table

Class Details

[line 30]
Class that connects to MySQL using the MySQLi extension

Tags:

author:  Merijn Schering <mschering@intermesh.nl>
version:  $Id: imap.class.inc 1201 2008-10-22 18:23:34Z mschering $
access:  public
usedby:  GO_MODULES
usedby:  GO_SECURITY
usedby:  filesystem
usedby:  search
usedby:  smtp_restrict
usedby:  GO_LINKS
usedby:  GO_CONFIG
usedby:  GOXML
usedby:  go_template_parser
usedby:  reminder
usedby:  GO_USERS


[ Top ]


Class Variables

$prepared_statement =  false

[line 43]

Set to true when are working with a prepared statement
Type:   bool


[ Top ]

$type =  "mysqli"

[line 36]

Type of database connector
Type:   unknown_type
Overrides:   Array


[ Top ]



Class Methods


method affected_rows [line 254]

int affected_rows( )

Gets the number of affected rows in a previous MySQL operatio Overrides base_db::affected_rows() (Gets the number of affected rows in a previous MySQL operatio)
[ Top ]

method connect [line 51]

resource connect( )

Connnects to the database

Tags:

return:  The connection link identifier
access:  public
Overrides base_db::connect() (Connnects to the database)
[ Top ]

method escape [line 289]

mixed escape( mixed $value, [bool $trim = true])

Escapes a value to make it safe to send to MySQL

Tags:

return:  the escaped value.
access:  public
Overrides base_db::escape() (Escapes a value to make it safe to send to MySQL)

Parameters:

mixed   $value  
bool   $trim   Trim the value

[ Top ]

method found_rows [line 180]

unknown found_rows( )

Returns the number of rows found when you have used SELECT SQL_CALC_FOUND_ROWS

Tags:

access:  public
Overrides base_db::found_rows() (Returns the number of rows found when you have used SELECT SQL_CALC_FOUND_ROWS)
[ Top ]

method free [line 78]

void free( )

Frees the memory associated with a result

return void

Overrides base_db::free() (Frees the memory associated with a result)
[ Top ]

method insert_id [line 304]

int insert_id( )

Returns the auto generated id used in the last query Overrides base_db::insert_id() (Returns the auto generated id used in the last query)
[ Top ]

method next_record [line 193]

unknown next_record( [int $result_type = DB_ASSOC])

Walk the result set from a select query

Tags:

access:  public
Overrides base_db::next_record() (Walk the reseult set from a select query)

Parameters:

int   $result_type   DB_ASSOC, DB_BOTH or DB_NUM

[ Top ]

method num_fields [line 264]

int num_fields( )

Get the number of fields in a result Overrides base_db::num_fields() (Get the number of fields in a result)
[ Top ]

method num_rows [line 245]

int num_rows( )

Return the number of rows found in the last select statement

Tags:

return:  Number of rows
access:  public
Overrides base_db::num_rows() (Return the number of rows found in the last select statement)
[ Top ]

method query [line 101]

object The query( string $sql, [string $types = ''], [mixed $params = array()])

Queries the database

Tags:

return:  result object
access:  public
Overrides base_db::query() (Queries the database)

Parameters:

string   $sql  
string   $types   The types of the parameters. possible values: i, d, s, b for integet, double, string and blob
mixed   $params   If a single or an array of parameters are given in the statement will be prepared

[ Top ]

method set_error [line 273]

void set_error( )

Sets the error and errno property

Tags:

access:  protected
Overrides base_db::set_error() (Sets the error and errno property)
[ Top ]

method __wakeup [line 314]

void __wakeup( )

When this object is stored in a session it must reconnect when created by the session again.

Tags:

access:  public
[ Top ]


Documentation generated on Thu, 30 Oct 2008 14:13:46 +0100 by phpDocumentor 1.4.0