returns countRows(
[string
$ref = 0]
)
|
|
Count rows of select query(based on reference)
Parameters:
API Tags:
Return: | number rows from select statement |
Access: | public |
Information Tags:
void dbClose(
[string
$dbLink = null]
)
|
|
Close link to DB
Parameters:
string |
$dbLink: |
link resource |
API Tags:
Information Tags:
void dbConnect(
string
$dbHost, string
$dbUser, string
$dbPass, [string
$dbName = NULL], [string
$dbCharset = NULL]
)
|
|
Connect to database
Parameters:
string |
$dbHost: |
address for mysql server |
string |
$dbUser: |
user for mysql server |
string |
$dbPass: |
password for mysql server |
string |
$dbName: |
database name |
string |
$dbCharset: |
charset to use |
API Tags:
Information Tags:
returns deleteRow(
string
$table, int
$recordId, [string
$ref = 0]
)
|
|
Delete row from given table
Parameters:
string |
$table: |
mysql table |
int |
$recordId: |
the record id to be deleted |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | the sql reference. |
Access: | public |
Information Tags:
returns executeSql(
string
$sql, [string
$ref = 0]
)
|
|
Execute sql statement and return result
Parameters:
string |
$sql: |
sql query to be returned |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | the sql reference. |
Access: | public |
Information Tags:
returns goFast(
string
$table, string
$key, string
$value, [string
$return = "id"]
)
|
|
Retrive value from given table based on 1 field
Parameters:
string |
$table: |
mysql table |
string |
$key: |
table field name |
string |
$value: |
the value to look for |
string |
$return: |
the field to return |
API Tags:
Return: | the value for the specified field,or null if query was empty |
Access: | public |
Information Tags:
returns insertRow(
string
$table, array
$array, [string
$ref = 0]
)
|
|
Insert record from given table
Parameters:
string |
$table: |
mysql table |
array |
$array: |
query fields |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | the sql reference. |
Access: | public |
Information Tags:
Get last inerted id
API Tags:
Return: | last inserted id |
Access: | public |
Information Tags:
returns readRow(
string
$table, array|string
$fields, [string
$ref = 0]
)
|
|
Read 1 row from given table
Parameters:
string |
$table: |
mysql table |
array|string |
$fields: |
query fields |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | an array with values or null if query is empty. |
Access: | public |
Information Tags:
returns readTable(
string
$table, [array|string
$fields = null], [string
$order = null], [string
$limit = null], [string
$ref = 0]
)
|
|
Read records from given table
Parameters:
string |
$table: |
mysql table |
array|string |
$fields: |
query fields |
string |
$order: |
order records |
string |
$limit: |
limit number of records |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | a multidimensional array or null if query is empty |
Access: | public |
Information Tags:
returns sqlToArray(
string
$sql, [string
$ref = 0]
)
|
|
Execute any select statement
Parameters:
string |
$sql: |
sql query to be returned |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | a 2 dimensions array with values or null if query is empty |
Access: | public |
Information Tags:
returns updateRow(
string
$table, array
$array, int
$recordId, [string
$ref = 0]
)
|
|
Update 1 record in given table
Parameters:
string |
$table: |
mysql table |
array |
$array: |
array of values to update |
int |
$recordId: |
the record id to be updated |
string |
$ref: |
gives a reference to the resource. See Using References |
API Tags:
Return: | the sql reference. |
Access: | public |
Information Tags:
void _cleanQuery(
string
$string
)
|
|
Protect against sql injection
Parameters:
string |
$string: |
clean values before sql query(prevent sql injection) |
API Tags:
void _queryFields(
array|string
$fields
)
|
|
Fields in the select statement WHERE clause
Parameters:
array|string |
$fields: |
query fields |
API Tags: