affected affected_rows(
)
|
|
Evaluate the result; which rows were affected by the query.
API Tags:
Redefinition of:
- atkMysqlDb::affected_rows()
- Evaluate the result; which rows were affected by the query.
Commit the current transaction.
API Tags:
Redefinition of:
- atkDb::commit()
- Commit the current transaction.
mixed doConnect(
string
$host, string
$user, string
$password, string
$database, int
$port, string
$charset
)
|
|
Connect to the database
Parameters:
|
string |
$host: |
Hostname |
|
string |
$user: |
Username |
|
string |
$password: |
Password |
|
string |
$database: |
The database to connect to |
|
int |
$port: |
The portnumber to use for connecting |
|
string |
$charset: |
The charset to use |
API Tags:
| Return: | Connection status |
Redefinition of:
- atkMysqlDb::doConnect()
- Connect to the database
Returns the last inserted auto increment value.
API Tags:
| Return: | auto increment value of latest insert query |
| Access: | public |
result lock(
string
$table, [string
$mode = "write"]
)
|
|
Lock a certain table in the database
Parameters:
|
string |
$table: |
the table name |
|
string |
$mode: |
the type of locking |
API Tags:
Redefinition of:
- atkMysqlDb::lock()
- Lock a certain table in the database
void locktables_fallback_on_error(
string
$query, [string
$querymode = 'w']
)
|
|
This method provides a fallback when error 1100 occurs (Table ... not locked using LOCK TABLES). This method locks the table and runs the query again.
Parameters:
|
string |
$query: |
The original query that failed |
|
string |
$querymode: |
Kind of query - 'w' for write or 'r' for read |
Redefinition of:
- atkMysqlDb::locktables_fallback_on_error()
- This method provides a fallback when error 1100 occurs (Table ... not locked using LOCK TABLES). This method locks the table and runs the query again.
array metadata(
string
$table, [bool
$full = false]
)
|
|
Return the meta data of a certain table
Parameters:
|
string |
$table: |
the table name |
|
bool |
$full: |
all meta data or not |
API Tags:
Redefinition of:
- atkMysqlDb::metadata()
- Return the meta data of a certain table
the nextid(
string
$sequence
)
|
|
Get the next sequence number of a certain sequence.
Parameters:
|
string |
$sequence: |
the sequence name |
API Tags:
Redefinition of:
- atkMysqlDb::nextid()
- Get the next sequence number of a certain sequence.
Goto the next record in the result set
API Tags:
| Return: | of going to the next record |
Redefinition of:
- atkMysqlDb::next_record()
- Goto the next record in the result set
Evaluatie the result; how many fields where affected by the query.
API Tags:
| Return: | of affected fields |
Redefinition of:
- atkMysqlDb::num_fields()
- Evaluatie the result; how many fields where affected by the query.
Evaluate the result; how many rows were affected by the query.
API Tags:
Redefinition of:
- atkMysqlDb::num_rows()
- Evaluate the result; how many rows were affected by the query.
void query(
string
$query, [int
$offset = -1], [int
$limit = -1]
)
|
|
Performs a query
Parameters:
|
string |
$query: |
the query |
|
int |
$offset: |
offset in record list |
|
int |
$limit: |
maximum number of records |
Redefinition of:
- atkMysqlDb::query()
- Performs a query
void rollback(
[string
$savepoint = ""]
)
|
|
Rollback the the current transaction.
Parameters:
|
string |
$savepoint: |
The savepoint to rollback to |
Redefinition of:
- atkDb::rollback()
- Rollback the current transaction.
void savepoint(
string
$name
)
|
|
Set savepoint with the given name.
Parameters:
|
string |
$name: |
savepoint name |
Redefinition of:
- atkDb::savepoint()
- Set savepoint with the given name.
void seek(
[int
$position = 0]
)
|
|
Goto a certain position in result set.
Not specifying a position will set the pointer at the beginning of the result set.
Parameters:
|
int |
$position: |
the position |
Redefinition of:
- atkMysqlDb::seek()
- Goto a certain position in result set.
array table_names(
[bool
$includeViews = true]
)
|
|
Return the available table names
Parameters:
|
bool |
$includeViews: |
Include views? |
API Tags:
| Return: | with table names etc. |
Redefinition of:
- atkMysqlDb::table_names()
- Return the available table names
void toggleForeignKeys(
boolean
$enable
)
|
|
Enable/disable all foreign key constraints.
Parameters:
|
boolean |
$enable: |
enable/disable foreign keys? |
Redefinition of:
- atkDb::toggleForeignKeys()
- Enable/disable all foreign key constraints.
Unlock table(s) in the database
API Tags:
Redefinition of:
- atkMysqlDb::unlock()
- Unlock table(s) in the database
Get all MySQL warnings for the previously executed query and make atkwarnings of them.
API Tags:
void _setErrorVariables(
)
|
|
Store MySQL errors in internal variables
API Tags:
Redefinition of:
- atkMysqlDb::_setErrorVariables()
- Store MySQL errors in internal variables