apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: MDB2_Result_Common

Source Location: /MDB2-2.0.0beta2/MDB2.php

Class Overview

MDB2_Result
   |
   --MDB2_Result_Common



Variables

Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 2487]


[ Top ]


Class Variables

$mdb =

[line 2489]


Type:   mixed


[ Top ]

$result =

[line 2490]


Type:   mixed


[ Top ]

$rownum =  -1

[line 2491]


Type:   mixed


[ Top ]

$types =

[line 2492]


Type:   mixed


[ Top ]



Method Detail

MDB2_Result_Common (Constructor)   [line 2500]

MDB2_Result_Common MDB2_Result_Common( &$mdb, &$result)

Constructor

Parameters:

   &$mdb   — 
   &$result   — 

[ Top ]

fetch   [line 2548]

mixed fetch( [int $rownum = 0], [int $colnum = 0])

fetch value from a result set
  • Return: string on success, a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Result_ibase::fetch()
fetch value from a result set
MDB2_Result_mysql::fetch()
fetch value from a result set
MDB2_Result_querysim::fetch()
fetch value from a result set
MDB2_Result_oci8::fetch()
fetch value from a result set
MDB2_Result_pgsql::fetch()
fetch value from a result set
MDB2_Result_sqlite::fetch()
fetch value from a result set
MDB2_Result_mssql::fetch()
fetch value from a result set
MDB2_Result_xxx::fetch()
fetch value from a result set

Parameters:

int   $rownum   —  number of the row where the data can be found
int   $colnum   —  field number where the data can be found

[ Top ]

fetchAll   [line 2681]

mixed fetchAll( [int $fetchmode = MDB2_FETCHMODE_DEFAULT], [boolean $rekey = false], [boolean $force_array = false], [boolean $group = false])

Fetch and return a column of data (it uses fetchRow for that)
  • Return: data array on success, a MDB2 error on failure
  • See: getAssoc()
  • Access: public

Parameters:

int   $fetchmode   —  how the array data should be indexed
boolean   $rekey   —  if set to true, the $all will have the first column as its first dimension
boolean   $force_array   —  used only when the query returns exactly two columns. If true, the values of the returned array will be one-element arrays instead of scalars.
boolean   $group   —  if true, the values of the returned array is wrapped in another array. If the same key value (in the first column) repeats itself, the values will be appended to this array instead of overwriting the existing values.

[ Top ]

fetchCol   [line 2644]

mixed fetchCol( [int $colnum = 0])

Fetch and return a column of data (it uses current for that)
  • Return: data array on success, a MDB2 error on failure
  • Access: public

Parameters:

int   $colnum   —  the column number to fetch

[ Top ]

fetchRow   [line 2587]

mixed fetchRow( [int $fetchmode = MDB2_FETCHMODE_DEFAULT])

Fetch and return a row of data
  • Return: data array on success, a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Result_ibase::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_BufferedResult_ibase::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_mysql::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_querysim::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_oci8::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_BufferedResult_oci8::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_pgsql::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_sqlite::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_mssql::fetchRow()
Fetch a row and insert the data into an existing array.
MDB2_Result_xxx::fetchRow()
Fetch a row and insert the data into an existing array.

Parameters:

int   $fetchmode   —  how the array data should be indexed

[ Top ]

free   [line 2818]

boolean free( )

Free the internal resources associated with result.
  • Return: true on success, false if result is invalid
  • Access: public

Overridden in child classes as:

MDB2_Result_ibase::free()
Free the internal resources associated with $result.
MDB2_BufferedResult_ibase::free()
Free the internal resources associated with $result.
MDB2_Result_mysql::free()
Free the internal resources associated with result.
MDB2_Result_oci8::free()
Free the internal resources associated with $result.
MDB2_BufferedResult_oci8::free()
Free the internal resources associated with $result.
MDB2_Result_pgsql::free()
Free the internal resources associated with result.
MDB2_Result_mssql::free()
Free the internal resources associated with $result.
MDB2_Result_xxx::free()
Free the internal resources associated with result.

[ Top ]

getColumnNames   [line 2752]

mixed getColumnNames( )

Retrieve the names of columns returned by the DBMS in a query result.
  • Return: associative array variable that holds the names of columns. The indexes of the array are the column names mapped to lower case and the values are the respective numbers of the columns starting from 0. Some DBMS may not return any columns when the result set does not contain any rows. a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Result_ibase::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_mysql::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_querysim::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_oci8::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_pgsql::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_sqlite::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_mssql::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.
MDB2_Result_xxx::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.

[ Top ]

getResource   [line 2804]

resource getResource( )

return the resource associated with the result object
  • Access: public

[ Top ]

nextResult   [line 2731]

true nextResult( a 0)

Move the internal result pointer to the next available result
  • Return: on success or an error object on failure
  • Access: public

Overridden in child classes as:

Move the internal result pointer to the next available result Currently not supported
MDB2_Result_mssql::nextResult()
Move the internal result pointer to the next available result Currently not supported
MDB2_Result_xxx::nextResult()
Move the internal mysql result pointer to the next available result Currently not supported

Parameters:

a   0   —  valid result resource

[ Top ]

numCols   [line 2768]

mixed numCols( )

Count the number of columns returned by the DBMS in a query result.
  • Return: integer value with the number of columns, a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Result_ibase::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_mysql::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_querysim::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_oci8::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_pgsql::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_sqlite::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_mssql::numCols()
Count the number of columns returned by the DBMS in a query result.
MDB2_Result_xxx::numCols()
Count the number of columns returned by the DBMS in a query result.

[ Top ]

resultIsNull   [line 2786]

mixed resultIsNull( int $rownum, int $colnum)

Determine whether the value of a query result located in given row and field is a null.
  • Return: true or false on success, a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Result_pgsql::resultIsNull()
Determine whether the value of a query result located in given row and field is a null.
MDB2_Result_xxx::resultIsNull()
Determine whether the value of a query result located in given row and field is a null.

Parameters:

int   $rownum   —  number of the row where the data can be found
int   $colnum   —  field number where the data can be found

[ Top ]

seek   [line 2564]

mixed seek( [int $rownum = 0])

seek to a specific row in a result set
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_BufferedResult_ibase::seek()
seek to a specific row in a result set
MDB2_BufferedResult_mysql::seek()
seek to a specific row in a result set
MDB2_BufferedResult_querysim::seek()
seek to a specific row in a result set
MDB2_BufferedResult_oci8::seek()
seek to a specific row in a result set
MDB2_BufferedResult_pgsql::seek()
seek to a specific row in a result set
MDB2_BufferedResult_sqlite::seek()
seek to a specific row in a result set
MDB2_BufferedResult_xxx::seek()
seek to a specific row in a result set

Parameters:

int   $rownum   —  number of the row where the data can be found

[ Top ]

setResultTypes   [line 2528]

mixed setResultTypes( string $types)

Define the list of types to be associated with the columns of a given result set.

This function may be called before invoking fetch(), fetchRow(), fetchCol() and fetchAll() so that the necessary data type conversions are performed on the data to be retrieved by them. If this function is not called, the type of all result set columns is assumed to be text, thus leading to not perform any conversions.

  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

string   $types   —  array variable that lists the data types to be expected in the result set columns. If this array contains less types than the number of columns that are returned in the result set, the remaining columns are assumed to be of the type text. Currently, the types clob and blob are not fully supported.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 10:15:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.