Class: MySQLConnection

Source Location: /CORE/system/classes/sql/MySQLConnection.php

Class MySQLConnection

Class Overview

Class used for connecting to a configurable MySQL Database.

Located in /CORE/system/classes/sql/MySQLConnection.php [line 38]

DatabaseConnection
   |
   --SimpleMySQLConnection
      |
      --MySQLConnection
Author(s):
  • Kevin Papst
Information Tags:
Version:  $Id: MySQLConnection.php,v 1.7 2008/12/30 21:28:45 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From SimpleMySQLConnection

SimpleMySQLConnection::SimpleMySQLConnection()
Connects to the DB by using the configured Database values.
SimpleMySQLConnection::close()
This closes the currently Connection.
SimpleMySQLConnection::connect()
Connects to a MySQL DB using the given Connection Values.
SimpleMySQLConnection::escape()
Escapes a value to be used in any SQL Statement.
SimpleMySQLConnection::freeResult()
Frees the given MySQL resources.
SimpleMySQLConnection::getError()
SimpleMySQLConnection::insert()
Inserts a new DB entry and if exists returns the auto increment value.
SimpleMySQLConnection::isConnected()
Returns whether we are connected to a DB or not.
SimpleMySQLConnection::sql()
Executes any SQL Statement (mysql_query).

Inherited From DatabaseConnection

DatabaseConnection::close()
Closes the currently used Connection.
DatabaseConnection::escape()
Escapes a value to be used in any SQL Statement.
DatabaseConnection::freeResult()
Free the given SQL resource.
DatabaseConnection::getError()
Return a DBError or null.
DatabaseConnection::insert()
Inserts one or more rows and returns the result.
DatabaseConnection::isConnected()
Returns whether we are connected to the Database or not.
DatabaseConnection::sql()
Returns the Result of this SQL Query.

[ Top ]
Method Summary
MySQLConnection   MySQLConnection()   Connects to a MySQL DB using the given Connection Values.

[ Top ]
Methods
Constructor MySQLConnection  [line 49]

  MySQLConnection MySQLConnection( String $host, String $db, String $user, String $password, [boolean $newConnection = false]  )

Connects to a MySQL DB using the given Connection Values.

Parameters:
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


[ Top ]