DbHelper
This documentation is for an outdated Matomo version.
Click here if you want to read this article for the latest version.
Click here if you want to read this article for the latest version.
Piwik\
DbHelper
Contains database related helper functions.
Methods
The class defines the following methods:
createTable()— Creates a new table in the database.
createTable()
Creates a new table in the database.
Example:
```
$tableDefinition = "age INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL";
DbHelper::createTable('tablename', $tableDefinition); ``
Signature
- It accepts the following parameter(s):
$nameWithoutPrefix(string) — The name of the table without any piwik prefix.$createDefinition(string) — The table create definition
- It does not return anything or a mixed result.