Table Prefixes and Custom Module
Hi,
I just started creating my first Simple Module.
So I have a module call pressarticles and the accompanying table fw_pressarticles (in my database config the table prefix fw_ is specified). So at first the CMS complained about the id field of table fw_pressarticles missing. So I renamed articleID to id. So far so good... the overview page of the module ist working. Now the CMS complains on creation of a new item, that it cannot find the table pressarticles (without the prefix). Why doesn't the CMS realize the configured prefix at this point?
Error message:
Ein Datenbankfehler ist aufgetreten
Error Number: 1146
Table 'db403895_3.pressarticles' doesn't exist
SHOW FULL COLUMNS FROM `pressarticles`
Filename: core/MY_DB_mysqli_driver.php
Line Number: 142
KR
Habib
Comments
I entered
function __construct() {
parent::__construct('pressarticles');
}
but must be
function __construct() {
parent::__construct('fw_pressarticles');
}