Class SimpleMySQLConnection

Description

Implementation of the DatabaseConnection to connect to a MySQL Database.

  • version: $Id: SimpleMySQLConnection.php,v 1.4 2006/11/26 22:04:25 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License
DatabaseConnection
   |
   --SimpleMySQLConnection
Direct descendents
Class Description
MySQLConnection Class used for connecting to a configurable MySQL Database.
StatisticConnection This class opens a Connection to the Statistic Database.
Method Summary
SimpleMySQLConnection SimpleMySQLConnection ()
void close ()
void connect (String $host, String $db, String $user, String $password, [boolean $newConnection = false])
void freeResult ( $result)
void insert ( $query)
boolean isConnected ()
void sql ( $query)
Methods
Constructor SimpleMySQLConnection (line 52)

Connects to the DB by using the configured Database values.

SimpleMySQLConnection SimpleMySQLConnection ()
close (line 149)

This closes the currently Connection.

Might be unnecessary (PHP closes links automatically).

void close ()

Redefinition of:
DatabaseConnection::close()
Closes the currently used Connection.
connect (line 64)

Connects to a MySQL DB using the given Connection Values.

void connect (String $host, String $db, String $user, String $password, [boolean $newConnection = false])
  • String $host: the DB Host
  • String $db: the Database to select
  • String $user: the DB User
  • String $password: the Users Password
  • boolean $newConnection: whether a new Connection should be established
freeResult (line 160)

Frees the given MySQL resources.

void freeResult ( $result)
  • $result

Redefinition of:
DatabaseConnection::freeResult()
Free the given SQL resource.
insert (line 134)

Inserts a new DB entry and if exists returns the auto increment value.

void insert ( $query)
  • $query

Redefinition of:
DatabaseConnection::insert()
Inserts one or more rows and returns the result.
isConnected (line 115)

Returns whether we are connected to a DB or not.

  • return: true on successful Connection
boolean isConnected ()

Redefinition of:
DatabaseConnection::isConnected()
Returns whether we are connected to the Database or not.
sql (line 122)

Executes any SQL Statement (mysql_query).

void sql ( $query)
  • $query

Redefinition of:
DatabaseConnection::sql()
Returns the Result of this SQL Query.

Inherited Methods

Inherited From DatabaseConnection

DatabaseConnection::close()
DatabaseConnection::freeResult()
DatabaseConnection::insert()
DatabaseConnection::isConnected()
DatabaseConnection::sql()

Documentation generated by phpDocumentor 1.3.1