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

Class: DB_result

Source Location: /DB-1.4.0/DB.php

Class Overview


This class implements a wrapper for a DB result set.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 661]
This class implements a wrapper for a DB result set.

A new instance of this class will be returned by the DB implementation after processing a query that returns data.



[ Top ]


Class Variables

$dbh =

[line 665]


Type:   mixed


[ Top ]

$limit_count =  null

[line 678]

for limit queries, the number of rows to fetch

Type:   integer


[ Top ]

$limit_from =  null

[line 672]

for limit queries, the row to start fetching

Type:   integer


[ Top ]

$result =

[line 666]


Type:   mixed


[ Top ]

$row_counter =  null

[line 667]


Type:   mixed


[ Top ]



Method Detail

DB_result (Constructor)   [line 688]

DB_result DB_result( resource &$dbh, resource $result, [mixed $options = array()])

DB_result constructor.

Parameters:

resource   &$dbh     DB object reference
resource   $result     result resource id

[ Top ]

fetchInto   [line 775]

mixed fetchInto( mixed &$arr, [mixed $fetchmode = DB_FETCHMODE_DEFAULT], [integer $rownum = null], integer $fetchmod)

Fetch a row of data into an existing variable.
  • Return: DB_OK on success, NULL on no more rows or a DB_Error object on error
  • Access: public

Parameters:

mixed   &$arr     reference to data containing the row
integer   $fetchmod     format of fetched row
integer   $rownum     the row number to fetch

[ Top ]

fetchRow   [line 711]

array fetchRow( [int $fetchmode = DB_FETCHMODE_DEFAULT], [int $rownum = null])

Fetch and return a row of data (it uses driver->fetchInto for that)
  • Return: a row of data, NULL on no more rows or PEAR_Error on error
  • Access: public

Parameters:

int   $fetchmode     format of fetched row
int   $rownum     the row number to fetch

[ Top ]

free   [line 870]

int free( )

Frees the resources allocated for this result set.
  • Return: error code
  • Access: public

[ Top ]

getRowCounter   [line 896]

integer getRowCounter( )

returns the actual row number

[ Top ]

nextResult   [line 857]

bool nextResult( )

Get the next result if a batch of queries was executed.
  • Return: true if a new result is available or false if not.
  • Access: public

[ Top ]

numCols   [line 829]

int numCols( )

Get the the number of columns in a result set.
  • Return: the number of columns, or a DB error
  • Access: public

[ Top ]

numRows   [line 843]

int numRows( )

Get the number of rows in a result set.
  • Return: the number of rows, or a DB error
  • Access: public

[ Top ]

tableInfo   [line 885]

void tableInfo( [mixed $mode = null])

  • Deprecated:

[ Top ]


Documentation generated on Fri, 30 Apr 2004 23:19:44 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.