Class: DataBase
Source Location: /system/databases/pgsql.class.php
This file is the pgsql implementation of the Geeklog abstraction layer.
|
|
Class Details
Class Methods
method buildString [line 106]
Creates a connection string for pg_connect Doesn't show the port because it isnt being provided in class default assumed
method database [line 180]
void database(
string
$dbhost, string
$dbname, sring
$dbuser,
$dbpass, [string
$errorlogfn = ''], [string
$charset = ''], string
$pass)
|
|
constructor for database This initializes an instance of the database object
Parameters:
method dbAffectedRows [line 203]
int dbAffectedRows(
object
$recordset)
|
|
Retrieves returns the number of effected rows for last query Retrieves returns the number of effected rows for last query
Tags:
Parameters:
method dbChange [line 584]
boolean dbChange(
string
$table, string
$item_to_set, string
$value_to_set, array|string
$id, array|string
$value, [boolean
$supress_quotes = false])
|
|
Changes records in a table This will change the data in the given table that meet the given criteria and will redirect user to another page if told to do so
Tags:
Parameters:
method dbCopy [line 286]
boolean dbCopy(
string
$table, string
$fields, string
$values, string
$tablefrom, array|string
$id, array|string
$value)
|
|
Copies a record from one table to another (can be the same table) This will use a REPLACE INTO...SELECT FROM to copy a record from one table to another table. They can be the same table.
Tags:
Parameters:
method dbCount [line 680]
boolean dbCount(
string
$table, [array|string
$id = ''], [array|string
$value = ''])
|
|
Returns the number of records for a query that meets the given criteria This will build a SELECT count(*) statement with the given criteria and return the result
Tags:
Parameters:
method dbDelete [line 521]
boolean dbDelete(
string
$table, array|string
$id, array|string
$value)
|
|
Deletes data from the database This will delete some data from the given table where id = value. If id and value are arrays then it will traverse the arrays setting $id[curval] = $value[curval].
Tags:
Parameters:
method dbError [line 838]
string dbError(
[string
$sql = ''])
|
|
Returns an database error message
Tags:
Parameters:
method dbFetchArray [line 245]
array dbFetchArray(
object
$recordset, [boolean
$both = false])
|
|
Retrieves record from a recordset Gets the next record in a recordset and returns in array
Tags:
Parameters:
method dbFieldName [line 266]
string dbFieldName(
object
$recordset, int
$fnumber)
|
|
Retrieves returns the field name for a field Returns the field name for a given field number
Tags:
Parameters:
method dbInsertId [line 737]
int dbInsertId(
[resource
$link_identifier = ''], [
$sequence = ''])
|
|
Returns the last ID inserted Returns the last auto_increment ID generated
Tags:
Parameters:
method dbLockTable [line 763]
void dbLockTable(
string
$table)
|
|
Lock a table Locks a table for write operations
Tags:
Parameters:
method dbNumRows [line 644]
int dbNumRows(
object
$recordset)
|
|
Retrieves the number of rows in a recordset This returns the number of rows in a recordset
Tags:
Parameters:
method dbQuery [line 337]
object Returns dbQuery(
string
$sql, [
$ignore_errors = 0], boolean
$ignore_error)
|
|
Executes a query on the pgSQL server This executes the passed SQL and returns the recordset or errors out
Tags:
Parameters:
method dbResult [line 221]
(depends dbResult(
object
$recordset, int
$row, [string
$field = 0])
|
|
Returns the contents of one cell from a MySQL result set
Tags:
Parameters:
method dbSave [line 386]
void dbSave(
string
$table, string
$fields, string
$values)
|
|
Saves information to the database This will use a REPLACE INTO to save a record into the database
Parameters:
method dbUnlockTable [line 788]
void dbUnlockTable(
string
$table)
|
|
Unlock a table Unlocks a table after a dbLockTable (actually, unlocks all tables)
Tags:
Parameters:
method isVerbose [line 867]
Checks to see if debug mode is on Returns value of $_verbose
Tags:
method setDisplayError [line 827]
void setDisplayError(
boolean
$flag)
|
|
Turns detailed error reporting on If set to true, this will display detailed error messages on the site. Otherwise, it will only that state an error occurred without going into details. The complete error message (including the offending SQL request) is always available from error.log.
Parameters:
method setVerbose [line 811]
void setVerbose(
boolean
$flag)
|
|
Turns debug mode on Set this to true to see debug messages
Parameters:
method _connect [line 125]
object Returns _connect(
)
|
|
Connects to the pgSQL database server This function connects to the MySQL server and returns the connection object
Tags:
method _errorlog [line 93]
void _errorlog(
string
$msg)
|
|
Logs messages Logs messages by calling the function held in $_errorlog_fn
Parameters:
|
|