Interface Phpfox_Database_Interface

Description

Template for all database drivers found in: library/phpfox/database/driver/

  • author: Raymond Benc
  • version: $Id: interface.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/database/interface.class.php (line 16)


	
			
Method Summary
 bool connect (string $sHost, string $sUser, string $sPass, string $sName, [mixed $sPort = false], [bool $sPersistent = false])
 string getServerInfo ()
 string getVersion ()
 resource query (string $sSql, [ &$hLink = ''], resource $hLink)
Methods
connect (line 29)

Makes a connection to the SQL database

  • return: If we were able to connect we return true, however if it failed we return false and a error message why.
  • access: public
bool connect (string $sHost, string $sUser, string $sPass, string $sName, [mixed $sPort = false], [bool $sPersistent = false])
  • string $sHost: Hostname or IP
  • string $sUser: User used to log into MySQL server
  • string $sPass: Password used to log into MySQL server. This can be blank.
  • string $sName: Name of the database.
  • mixed $sPort: Port number (int) or false by default since we do not need to define a port.
  • bool $sPersistent: False by default but if you need a persistent connection set this to true.
getServerInfo (line 43)

Returns SQL server information.

  • access: public
string getServerInfo ()
getVersion (line 36)

Returns the SQL version

  • access: public
string getVersion ()
query (line 53)

Performs sql query with error reporting and logging.

  • return: Returns the MYSQL resource from the function mysql_query()
  • see: mysql_query()
  • access: public
resource query (string $sSql, [ &$hLink = ''], resource $hLink)
  • string $sSql: MySQL query to perform
  • resource $hLink: MySQL resource. If nothing is passed we load the default master server.
  • &$hLink

Documentation generated on Tue, 28 Sep 2010 10:36:40 +0200 by phpDocumentor 1.4.0a2