Class: DB_mysql
Source Location: /DB-1.9.2/DB/mysql.php
PEAR
|
--DB_common
|
--DB_mysql
The methods PEAR DB uses to interact with PHP's mysql extension for interacting with MySQL databases
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 169]
This constructor calls parent::__construct()
Overrides DB_common::__construct() (This constructor calls $this->PEAR('DB_Error'))
affectedRows [line 559]
Determines the number of rows affected by a data maniuplation query - is returned for queries that don't manipulate data.
Overrides DB_common::affectedRows() (Determines the number of rows affected by a data maniuplation query)
autoCommit [line 489]
int autoCommit(
[bool
$onoff = false])
|
|
Enables or disables automatic commits
Overrides DB_common::autoCommit() (Enables or disables automatic commits)
Parameters:
commit [line 505]
Commits the current transaction
Overrides DB_common::commit() (Commits the current transaction)
connect [line 196]
int connect(
array
$dsn, [bool
$persistent = false])
|
|
Connect to the database server, log in and open the database Don't call this method directly. Use DB::connect() instead. PEAR DB's mysql driver supports the following extra DSN options: - new_link If set to true, causes subsequent calls to connect()
to return a new connection link instead of the
existing one. WARNING: this is not portable to
other DBMS's. Available since PEAR DB 1.7.0.
- client_flags Any combination of MYSQL_CLIENT_* constants.
Only used if PHP is at version 4.3.0 or greater.
Available since PEAR DB 1.7.0.
Parameters:
createSequence [line 666]
int createSequence(
string
$seq_name)
|
|
Creates a new sequence
Overrides DB_common::createSequence() (Creates a new sequence)
Parameters:
disconnect [line 278]
Disconnects from the database server
dropSequence [line 697]
errorNative [line 898]
Gets the DBMS' native error code produced by the last query
Overrides DB_common::errorNative() (Gets the DBMS' native error code produced by the last query)
escapeSimple [line 788]
string escapeSimple(
string
$str)
|
|
Escapes a string according to the current DBMS's standards
Overrides DB_common::escapeSimple() (Escapes a string according to the current DBMS's standards)
Parameters:
fetchInto [line 375]
mixed fetchInto(
resource
$result,
&$arr, int
$fetchmode, [int
$rownum = null], array
$arr)
|
|
Places a row from the result set into the given array Formating of the array and the data therein are configurable. See DB_result::fetchInto() for more information. This method is not meant to be called directly. Use DB_result::fetchInto() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
freeResult [line 423]
bool freeResult(
resource
$result)
|
|
Deletes the result set and frees the memory occupied by the result set This method is not meant to be called directly. Use DB_result::free() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
getSpecialQuery [line 1009]
string getSpecialQuery(
string
$type)
|
|
Obtains the query string needed for listing a given type of objects
Overrides DB_common::getSpecialQuery() (Obtains the query string needed for listing a given type of objects)
Parameters:
modifyLimitQuery [line 846]
string modifyLimitQuery(
string
$query, int
$from, int
$count, [mixed
$params = array()])
|
|
Adds LIMIT clauses to a query string according to current DBMS standards
Overrides DB_common::modifyLimitQuery() (Adds LIMIT clauses to a query string according to current DBMS standards)
Parameters:
modifyQuery [line 814]
string modifyQuery(
string
$query)
|
|
Changes a query string for various DBMS specific reasons This little hack lets you know how many rows were deleted when running a "DELETE FROM table" query. Only implemented if the DB_PORTABILITY_DELETE_COUNT portability option is on.
Overrides DB_common::modifyQuery() (Changes a query string for various DBMS specific reasons)
Parameters:
mysqlRaiseError [line 870]
object the mysqlRaiseError(
[int
$errno = null])
|
|
Produces a DB_Error object regarding the current problem
Parameters:
nextId [line 584]
int nextId(
string
$seq_name, [boolean
$ondemand = true])
|
|
Returns the next free id in a sequence
Overrides DB_common::nextId() (Returns the next free id in a sequence)
Parameters:
nextResult [line 347]
false nextResult(
a
$result)
|
|
Move the internal mysql result pointer to the next available result This method has not been implemented yet.
Parameters:
numCols [line 444]
int numCols(
resource
$result)
|
|
Gets the number of columns in a result set This method is not meant to be called directly. Use DB_result::numCols() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters:
numRows [line 469]
int numRows(
resource
$result)
|
|
Gets the number of rows in a result set This method is not meant to be called directly. Use DB_result::numRows() instead. It can't be declared "protected" because DB_result is a separate object.
Overrides DB_common::numRows() (Determines the number of rows in a query result)
Parameters:
quoteIdentifier [line 770]
string quoteIdentifier(
string
$str)
|
|
Quotes a string so it can be safely used as a table or column name (WARNING: using names that require this is a REALLY BAD IDEA) WARNING: Older versions of MySQL can't handle the backtick character (`) in table or column names.
Overrides DB_common::quoteIdentifier() (Quotes a string so it can be safely used as a table or column name)
Parameters:
rollback [line 531]
simpleQuery [line 301]
mixed simpleQuery(
string
$query)
|
|
Sends a query to the database server Generally uses mysql_query(). If you want to use mysql_unbuffered_query() set the "result_buffering" option to 0 using setOptions(). This option was added in Release 1.7.0.
Parameters:
tableInfo [line 921]
array tableInfo(
object|string
$result, [int
$mode = null])
|
|
Returns information about a table or a result set
Overrides DB_common::tableInfo() (Returns information about a table or a result set)
Parameters:
Documentation generated on Mon, 11 Mar 2019 16:04:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|