Class: database
Source Location: /system/databases/mssql.class.php
This file is the mssql implementation of the Geeklog abstraction layer.
|
|
|
Class Details
Class Variables
Class Methods
constructor database [line 156]
database 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 array_push_associative [line 1084]
void array_push_associative(
&$arr)
|
|
Parameters:
method changeDESCRIBE [line 320]
void changeDESCRIBE(
$sql)
|
|
Parameters:
method cleanseSQL [line 229]
void cleanseSQL(
$originalsql, [
$skipQuoteReplacement = 0])
|
|
Parameters:
method cleanse_date_sub [line 1020]
string cleanse_date_sub(
string
$sql)
|
|
returns a sql string that has the pesky date_sub removed from it
Tags:
Parameters:
method dbAffectedRows [line 920]
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 650]
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 775]
void dbCopy(
$table,
$fields,
$values,
$tablefrom,
$id,
$value)
|
|
Parameters:
method dbCount [line 711]
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 593]
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 987]
string dbError(
[string
$sql = ''])
|
|
this does not have any use in mssql. but kept here for reference returns a database error string Returns an database error message
Tags:
Parameters:
method dbFetchArray [line 936]
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 906]
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 dbGetVersion [line 1157]
method dbInsertId [line 964]
int dbInsertId(
[resource
$link_identifier = ''], [
$sequence = ''])
|
|
Returns the last ID inserted Returns the last auto_increment ID generated
Tags:
Parameters:
method dbLockTable [line 1113]
void dbLockTable(
string
$table)
|
|
Lock a table Locks a table for write operations
Tags:
Parameters:
method dbNumFields [line 891]
int dbNumFields(
object
$recordset)
|
|
Retrieves the number of fields in a recordset This returns the number of fields in a recordset
Tags:
Parameters:
method dbNumRows [line 825]
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 354]
object Returns dbQuery(
string
$sql, [
$ignore_errors = 0], [
$skipQuoteReplacement = 0], boolean
$ignore_error)
|
|
Executes a query on the server This executes the passed SQL and returns the recordset or errors out
Tags:
Parameters:
method dbResult [line 868]
(depends dbResult(
object
$recordset, int
$row, [string
$field = 0])
|
|
Returns the contents of one cell from a mssql result set
Tags:
Parameters:
method dbSave [line 532]
void dbSave(
string
$table, string
$fields, string
$values)
|
|
Saves information to the database This mimicks the Replace Into mysql call to save a record into the database
Parameters:
method dbUnlockTable [line 1139]
void dbUnlockTable(
string
$table)
|
|
Unlock a table Unlocks a table after a dbLockTable (actually, unlocks all tables)
Tags:
Parameters:
method isVerbose [line 205]
Checks to see if debug mode is on Returns value of $_verbose
Tags:
method setDisplayError [line 192]
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 setErrorFunction [line 222]
void setErrorFunction(
string
$functionname)
|
|
Sets the function this class should call to log debug messages
Parameters:
method setVerbose [line 176]
void setVerbose(
boolean
$flag)
|
|
Turns debug mode on Set this to true to see debug messages
Parameters:
|
|