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

Class: MDB2_Result_Common

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

Class Overview

MDB2_Result
   |
   --MDB2_Result_Common



Variables

Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 2484]


[ Top ]


Class Variables

$column_names =

[line 2494]


Type:   mixed


[ Top ]

$db =

[line 2486]


Type:   mixed


[ Top ]

$limit =

[line 2493]


Type:   mixed


[ Top ]

$offset =

[line 2491]


Type:   mixed


[ Top ]

$offset_count =  0

[line 2492]


Type:   mixed


[ Top ]

$result =

[line 2487]


Type:   mixed


[ Top ]

$rownum =  -1

[line 2488]


Type:   mixed


[ Top ]

$types =

[line 2489]


Type:   mixed


[ Top ]

$values =

[line 2490]


Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 2501]

MDB2_Result_Common __construct( &$db, &$result, [ $limit = 0], [ $offset = 0])

Constructor

Parameters:

   &$db   — 
   &$result   — 
   $limit   — 
   $offset   — 

[ Top ]

MDB2_Result_Common (Constructor)   [line 2509]

MDB2_Result_Common MDB2_Result_Common( &$db, &$result, [ $limit = 0], [ $offset = 0])


Parameters:

   &$db   — 
   &$result   — 
   $limit   — 
   $offset   — 

[ Top ]

bindColumn   [line 2842]

mixed bindColumn( int $column, &$value, [string $type = null], mixed $value)

Set bind variable to a column.
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

int   $column   — 
mixed   $value   — 
string   $type   —  specifies the type of the field
   &$value   — 

[ Top ]

fetchAll   [line 2662]

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   —  the fetch mode to use:
  • MDB2_FETCHMODE_ORDERED
  • MDB2_FETCHMODE_ASSOC
  • MDB2_FETCHMODE_ORDERED | MDB2_FETCHMODE_FLIPPED
  • MDB2_FETCHMODE_ASSOC | MDB2_FETCHMODE_FLIPPED
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 2619]

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 ]

fetchOne   [line 2595]

string fetchOne( [int $colnum = 0])

fetch single column from the first row from a result set
  • Return: data on success, a MDB2 error on failure
  • Access: public

Parameters:

int   $colnum   —  the column number to fetch

[ Top ]

fetchRow   [line 2579]

int &fetchRow( [int $fetchmode = MDB2_FETCHMODE_DEFAULT], [int $rownum = null])

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_fbsql::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_mysqli::fetchRow()
Fetch a row and insert the data into an existing array.
DB_result::fetchRow()
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
int   $rownum   —  number of the row where the data can be found

[ Top ]

free   [line 2889]

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_fbsql::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_mysqli::free()
Free the internal resources associated with result.
DB_result::free()
MDB2_Result_xxx::free()
Free the internal resources associated with result.

[ Top ]

getColumnNames   [line 2766]

mixed getColumnNames( )

Retrieve the names of columns returned by the DBMS in a query result or from the cache.
  • 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_xxx::getColumnNames()
Retrieve the names of columns returned by the DBMS in a query result.

[ Top ]

getResource   [line 2824]

resource getResource( )

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

[ Top ]

getRowCounter   [line 2729]

integer getRowCounter( )

returns the actual row number that was last fetched (count from 0)

Overridden in child classes as:

DB_result::getRowCounter()

[ Top ]

nextResult   [line 2744]

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:

MDB2_Result_fbsql::nextResult()
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
DB_result::nextResult()
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 2809]

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_fbsql::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_mysqli::numCols()
Count the number of columns returned by the DBMS in a query result.
DB_result::numCols()
MDB2_Result_xxx::numCols()
Count the number of columns returned by the DBMS in a query result.

[ Top ]

seek   [line 2555]

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_fbsql::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_mssql::seek()
seek to a specific row in a result set
MDB2_BufferedResult_mysqli::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 2536]

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 fetchRow(), fetchOne(), 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 14:20:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.