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

Class: MDB_QueryTool_Result

Source Location: /MDB_QueryTool-1.2.3/MDB/QueryTool/Result.php

Class Overview


MDB_QueryTool_Result class


Author(s):

Copyright:

  • 2003-2007 Lorenzo Alberton

Methods


Child classes:

MDB_QueryTool_Result_Object
MDB_QueryTool_Result_Object class

Inherited Variables

Inherited Methods


Class Details

[line 56]
MDB_QueryTool_Result class

This result actually contains the 'data' itself, the number of rows returned and some additional info using ZE2 you can also get retrieve data from the result doing the following: <MDB_QueryTool_Common-instance>->getAll()->getCount() or <MDB_QueryTool_Common-instance>->getAll()->getData()



[ Top ]


Method Detail

MDB_QueryTool_Result (Constructor)   [line 97]

MDB_QueryTool_Result MDB_QueryTool_Result( array $data)

create a new instance of result with the data returned by the query
  • Access: public

Parameters:

array   $data   —  the data returned by the result

[ Top ]

fetchRow   [line 279]

void fetchRow( )

This function emulates PEAR_MDB fetchRow() method.

With this method, MDB_QueryTool can transparently replace PEAR::MDB

  • Todo: implement fetchmode support?
  • Access: public

Overridden in child classes as:

MDB_QueryTool_Result_Object::fetchRow()
This function emulates PEAR::MDB fetchRow() method With this function MDB_QueryTool can transparently replace PEAR::MDB

[ Top ]

getCount   [line 178]

integer getCount( )

return the number of rows returned
  • Return: the number of rows returned
  • Access: public

[ Top ]

getData   [line 194]

mixed getData( [string $key = null])

get all the data returned
  • Return: array or PEAR_Error
  • Access: public

Parameters:

string   $key   —  key

[ Top ]

getFirst   [line 216]

mixed getFirst( )

get the first result set we are not using next, current, and reset, since those ignore keys which are empty or 0
  • Access: public

Overridden in child classes as:

MDB_QueryTool_Result_Object::getFirst()
get the first result set

[ Top ]

getNext   [line 239]

mixed getNext( )

Get next result set. If getFirst() has never been called before, it calls that method.
  • Access: public

Overridden in child classes as:

MDB_QueryTool_Result_Object::getNext()
Alias for fetchRow()

[ Top ]

hasMore   [line 260]

boolean hasMore( )

check if there are other rows
  • Access: public

Overridden in child classes as:

MDB_QueryTool_Result_Object::hasMore()
check if there are other rows

[ Top ]

numRows   [line 164]

integer numRows( )

return the number of rows returned. This is an alias for getCount().
  • Access: public

[ Top ]

_returnRowOrValue   [line 147]

mixed _returnRowOrValue( array $data)

Check if the row is a single value with a numeric index.

If so, return the value straight away, since the user probably called getCol() or getOne().

  • Access: protected

Parameters:

array   $data   —  the data returned by the result

[ Top ]


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