Class dbrecords

Description

DB Records class Renders a query into data and allows access to the data either directly or via the usual get first,last,next,previous cursor navigation.

This class returns data as an associative array and is thus the most useful of all the data access methods. It extends the dbrows class, and over-rides the get_row_raw method to retrieve data.

  • see: dbrows.

Located in /query-defs.php (line 830)

sqlquery
   |
   --dbquery
      |
      --dbrows
         |
         --dbrecords
Direct descendents
Class Description
 class dbselect DB Select class A special case of the dbrecords class.
Method Summary
 dbrecords dbrecords ([string $sql = ""])
 mixed field (string $fieldname)
 boolean istrue (string $fieldname)
 mixed rawfield (string $fieldname)
Variables
Methods
Constructor dbrecords (line 836)

Constructor Create a new DB Records object.

dbrecords dbrecords ([string $sql = ""])
  • string $sql: An SQL statement in full
field (line 881)

Get field content Return the field content from the current database array (row).

If the value is a string, then stripslashes is done automatically.

  • return: Value of the named field
mixed field (string $fieldname)
  • string $fieldname: The name of the field to return value of
istrue (line 902)

Database independent boolean handling. Returns TRUE if the named field in the current row is boolean true according to the rules of the underlying database, else returns FALSE.

  • return: True if field contains database-dependent true value
boolean istrue (string $fieldname)
  • string $fieldname: The name of the field to return boolean value of
rawfield (line 863)

Get field content Return the field content from the current database array (row).

Does not provide ANY pre/post-processing.

  • return: Value of the named field
mixed rawfield (string $fieldname)
  • string $fieldname: The name of the field to return value of

Inherited Methods

Inherited From dbrows

 dbrows::dbrows()
 dbrows::eof()
 dbrows::execute()
 dbrows::get_current()
 dbrows::get_first()
 dbrows::get_last()
 dbrows::get_next()
 dbrows::get_previous()
 dbrows::get_row()
 dbrows::refresh()
 dbrows::rowexists()
 dbrows::set_sql()

Inherited From dbquery

 dbquery::dbquery()
 dbquery::execute()
 dbquery::set_sql()
 dbquery::tidyup()

Inherited From sqlquery

 sqlquery::sqlquery()
 sqlquery::build()
 sqlquery::clear()
 sqlquery::fieldlist()
 sqlquery::from()
 sqlquery::groupby()
 sqlquery::into()
 sqlquery::limit()
 sqlquery::offset()
 sqlquery::orderby()
 sqlquery::rebuild()
 sqlquery::set()
 sqlquery::tables()
 sqlquery::where()

Documentation generated by phpDocumentor 1.3.0RC3