Overriding the affected rows count to what was set.
API Tags:
Redefinition of:
- atkDb::affected_rows()
- Retrieve the number of rows affected by the last query.
void clearQueryHistory(
)
|
|
Clear the query history.
Connect to the database.
API Tags:
| Return: | Connection status |
| Abstract: | |
Redefinition of:
- atkDb::connect()
- Connect to the database.
Create an atkDDL object for constructing ddl queries.
API Tags:
Redefinition of:
- atkDb::createDDL()
- Create an atkDDL object for constructing ddl queries.
Create an atkQuery object for constructing queries.
API Tags:
Redefinition of:
- atkDb::createQuery()
- Create an atkQuery object for constructing queries.
Returns the last executed query.
API Tags:
| Return: | last executed query |
Retrieve the query history.
int nextid(
string
$sequence
)
|
|
returns nextid When the sequence isn't set the value 1 is returned.
Parameters:
API Tags:
Redefinition of:
- atkDb::nextid()
- Get the next sequence number of a certain sequence.
Retrieve the next record in the resultset.
API Tags:
| Return: | An array containing the record, or false if there are no more records to retrieve. |
| Access: | public |
Redefinition of:
- atkDb::next_record()
- Retrieve the next record in the resultset.
void query(
string
$query, [int
$offset = -1], [int
$limit = -1]
)
|
|
Parse and execute a query.
If the query is a select query, the rows can be retrieved using the next_record() method.
Parameters:
|
string |
$query: |
The SQL query to execute |
|
int |
$offset: |
Retrieve the results starting at the specified record number. Pass -1 or 0 to start at the first record. |
|
int |
$limit: |
Indicates how many rows to retrieve. Pass -1 to retrieve all rows. |
API Tags:
Redefinition of:
- atkDb::query()
- Parse and execute a query.
void setAffectedRows(
array
$result
)
|
|
Set the affected rows, expecting an array with rows
Parameters:
API Tags:
void setNextId(
string
$sequence, int
$nextid
)
|
|
Set the next id
Parameters:
|
string |
$sequence: |
|
|
int |
$nextid: |
|
void setRegexResult(
mixed
$result, string
$regex, [int
$offset = -1], [int
$limit = -1]
)
|
|
Set the regex result for the query
Parameters:
|
mixed |
$result: |
|
|
string |
$regex: |
|
|
int |
$offset: |
|
|
int |
$limit: |
|
void setResult(
mixed
$result, string
$query, [int
$offset = -1], [int
$limit = -1]
)
|
|
Set the result for the query (to mock executing a query)
Parameters:
|
mixed |
$result: |
|
|
string |
$query: |
|
|
int |
$offset: |
|
|
int |
$limit: |
|
void setTables(
array
$tables
)
|
|
Sets the tables in the database.
Parameters:
|
array |
$tables: |
table names |
API Tags:
boolean tableExists(
string
$table
)
|
|
Returns whatever the given table exists in the database.
Parameters:
|
string |
$table: |
table name |
API Tags:
| Return: | table exists? |
| Access: | public |
Redefinition of:
- atkDb::tableExists()
- This function checks the database for a table with the provide name