Docs Goabase

Data
in package

Class responsible for database operations including select, insert, update, and delete.

Table of Contents

Methods

checkExist()  : int
Prueft, ob DB-Eintrag bereits vorhanden. Gibt ID zurueck oder 0, wenn nicht existent
cntRecords()  : int
Sehr alte Funktion, die simpel die Anzahl ermitteln soll
doQuery()  : void
Alle delete und insert + update, die nicht normal sind
doQueryCnt()  : int
Alle delete und insert + update, die nicht normal sind
getByWhere()  : array<string|int, mixed>
Holt einen Datensatz anhand der where-bedingung
getField()  : mixed
Get field of a table on the recordID
getFieldByWhere()  : mixed
Holt feld einer tabelle anhand einer where-bedingung
getIdArr()  : array<string|int, mixed>
getLimitOne()  : string
getRecord()  : array<string|int, mixed>
Get record or field(s) of record by id
getRowAssoc()  : array<string|int, mixed>
getRowResult()  : array<string|int, mixed>
getRows()  : array<string|int, mixed>
getVal()  : mixed
numFields()  : int
getInstance()  : SQL

Methods

checkExist()

Prueft, ob DB-Eintrag bereits vorhanden. Gibt ID zurueck oder 0, wenn nicht existent

public static checkExist(string $strTable, array<string|int, mixed> $saField) : int
Parameters
$strTable : string
$saField : array<string|int, mixed>
Return values
int
  • id

cntRecords()

Sehr alte Funktion, die simpel die Anzahl ermitteln soll

public static cntRecords(string $strTableName[, string $strWhere = '' ][, int $nCache = 0 ]) : int
Parameters
$strTableName : string
$strWhere : string = ''
  • komplettes where
$nCache : int = 0
Return values
int

doQuery()

Alle delete und insert + update, die nicht normal sind

public static doQuery(string $sql) : void
Parameters
$sql : string

doQueryCnt()

Alle delete und insert + update, die nicht normal sind

public static doQueryCnt(string $sql[, bool $getInsertID = false ]) : int
Parameters
$sql : string
$getInsertID : bool = false
Return values
int

getByWhere()

Holt einen Datensatz anhand der where-bedingung

public static getByWhere(string $strTable, string $strWhere[, string $strFields = '*' ]) : array<string|int, mixed>
Parameters
$strTable : string

Tabellenname

$strWhere : string

Komplette "where a = ..."

$strFields : string = '*'

Felder der Tabelle

Return values
array<string|int, mixed>

fetch_assoc

getField()

Get field of a table on the recordID

public static getField(string $strTable, string $strField, int $intID[, bool $bCache = false ]) : mixed
Parameters
$strTable : string
$strField : string
$intID : int
$bCache : bool = false

getFieldByWhere()

Holt feld einer tabelle anhand einer where-bedingung

public static getFieldByWhere(string $strTable, string $strField, string $strWhere) : mixed

"select $strField from $strTable $strWhere"

Parameters
$strTable : string
$strField : string
$strWhere : string
Tags
since
26.10.1999

getIdArr()

public static getIdArr(string $sql[, string $key = 'id' ]) : array<string|int, mixed>
Parameters
$sql : string
$key : string = 'id'
Return values
array<string|int, mixed>

getLimitOne()

public static getLimitOne(string $strSQL) : string
Parameters
$strSQL : string
Return values
string

getRecord()

Get record or field(s) of record by id

public static getRecord(string $strTable, int $intID[, array<string|int, mixed> $saField = [] ]) : array<string|int, mixed>
Parameters
$strTable : string
$intID : int
$saField : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getRowAssoc()

public static getRowAssoc(string $strSQL) : array<string|int, mixed>
Parameters
$strSQL : string
Return values
array<string|int, mixed>

getRowResult()

public static getRowResult(array<string|int, mixed> $return[, int $rowCnt = 0 ][, string $field = '' ]) : array<string|int, mixed>
Parameters
$return : array<string|int, mixed>
$rowCnt : int = 0
$field : string = ''
Return values
array<string|int, mixed>

getRows()

public static getRows(string $strSQL) : array<string|int, mixed>
Parameters
$strSQL : string
Return values
array<string|int, mixed>

getVal()

public static getVal(string $strSQL) : mixed
Parameters
$strSQL : string

numFields()

public static numFields(array<string|int, mixed> $result) : int
Parameters
$result : array<string|int, mixed>
Return values
int

getInstance()

private static getInstance() : SQL
Return values
SQL

        
On this page

Search results