POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_DB_MySQL

Source Location: /classes/OTS_DB_MySQL.php

Class OTS_DB_MySQL

Class Overview

MySQL connection interface.

MySQL connection interface. At all everything that you really need to read from this class documentation is list of parameters for driver's constructor.

Located in /classes/OTS_DB_MySQL.php [line 25]

PDO
   |
   --OTS_Base_DB
      |
      --OTS_DB_MySQL
Author(s):
Information Tags:
Version:  0.0.1
Version:  0.1.3

Methods

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

Inherited From OTS_Base_DB

OTS_Base_DB::fieldName()
Query-quoted field name.
OTS_Base_DB::limit()
LIMIT/OFFSET clause for queries.
OTS_Base_DB::SQLquery()
OTS_Base_DB::SQLquote()
OTS_Base_DB::tableName()
Query-quoted table name.

[ Top ]
Method Summary
OTS_DB_MySQL   __construct()   Creates database connection.
string   fieldName()   Query-quoted field name.
string   limit()   LIMIT/OFFSET clause for queries.

[ Top ]
Methods
Constructor __construct  [line 50]

  OTS_DB_MySQL __construct( array $params  )

Creates database connection.

Creates database connection. Connects to MySQL database on given arguments.

List of parameters for this drivers:

  • host - database server.
  • port - port (optional, also it is possible to use host:port in host parameter).
  • database - database name.
  • user - user login.
  • password - user password.

Parameters:
array   $params:  Connection parameters.

API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Version:  0.0.1
Throws:  PDOException On PDO operation error.

[ Top ]
fieldName  [line 106]

  string fieldName( string $name  )

Query-quoted field name.

Query-quoted field name.

Parameters:
string   $name:  Field name.

API Tags:
Return:  Quoted name.
Access:  public

Information Tags:
Version:  0.0.1

Redefinition of:
OTS_Base_DB::fieldName()
Query-quoted field name.

[ Top ]
limit  [line 118]

  string limit( [int|bool $limit = false], [int|bool $offset = false]  )

LIMIT/OFFSET clause for queries.

LIMIT/OFFSET clause for queries.

Parameters:
int|bool   $limit:  Limit of rows to be affected by query (false if no limit).
int|bool   $offset:  Number of rows to be skipped before applying query effects (false if no offset).

API Tags:
Return:  LIMIT/OFFSET SQL clause for query.
Access:  public

Information Tags:
Version:  0.0.1

Redefinition of:
OTS_Base_DB::limit()
LIMIT/OFFSET clause for queries.

[ Top ]