Stud.IP  5.4
DbSnapshot Class Reference

Public Member Functions

 __construct ($dbresult=null)
 
 isDbResult ()
 
 getSnapshot ()
 
 nextRow ()
 
 resetPos ()
 
 isField ($name)
 
 getRow ($row=false)
 
 getFieldList ()
 
 getField ($field=0)
 
 getRows ($fieldname=0)
 
 getDistinctRows ($fieldname)
 
 sortRows ($fieldname=0, $order="ASC", $stype=false)
 
 searchFields ($fieldname, $searchstr)
 
 getGroupedResult ($group_by_field, $fields_to_group=null)
 
 mergeSnapshot ($m_snap, $key_field=false, $mode="ADD")
 
 halt ($msg)
 

Data Fields

 $DbClass = "DB_Sql"
 
 $dbResult = null
 
 $result = []
 
 $metaData = []
 
 $numFields = 0
 
 $numRows = 0
 
 $pos = false
 
 $debug = false
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $dbresult = null)

Constructor

Pass instance of DbClass or nothing to specify result set later

public

Parameters
objectDB_Sql $dbresult

Member Function Documentation

◆ getDistinctRows()

getDistinctRows (   $fieldname)

◆ getField()

getField (   $field = 0)

◆ getFieldList()

getFieldList ( )

◆ getGroupedResult()

getGroupedResult (   $group_by_field,
  $fields_to_group = null 
)

◆ getRow()

getRow (   $row = false)

◆ getRows()

getRows (   $fieldname = 0)

◆ getSnapshot()

getSnapshot ( )

◆ halt()

halt (   $msg)

print error message and exit script

private

Parameters
string$msgthe message to print

◆ isDbResult()

isDbResult ( )

◆ isField()

isField (   $name)

◆ mergeSnapshot()

mergeSnapshot (   $m_snap,
  $key_field = false,
  $mode = "ADD" 
)

◆ nextRow()

nextRow ( )

◆ resetPos()

resetPos ( )

◆ searchFields()

searchFields (   $fieldname,
  $searchstr 
)

◆ sortRows()

sortRows (   $fieldname = 0,
  $order = "ASC",
  $stype = false 
)

Field Documentation

◆ $DbClass

string $DbClass = "DB_Sql"

the used db abstraction class

private

◆ $dbResult

object DB_Sql $dbResult = null

the used db result set

private

◆ $debug

boolean $debug = false

turn on/off debugging

public

◆ $metaData

array $metaData = []

array to store metadata oh the result set

private

◆ $numFields

integer $numFields = 0

the number of fields in the result set

public

◆ $numRows

integer $numRows = 0

the number of rows in the result set

public

◆ $pos

mixed $pos = false

the internal row pointer

private

◆ $result

array $result = []

array to store the result set

private


The documentation for this class was generated from the following file: