when i try to access the database using
it ends in an errorCode:$q1 = $this->Database->prepare($sql)->execute();
Fatal error: Using $this when not in object context in C:\...\mymodule\dca\tl_module.php on line 67
when i try to access the database using
it ends in an errorCode:$q1 = $this->Database->prepare($sql)->execute();
Fatal error: Using $this when not in object context in C:\...\mymodule\dca\tl_module.php on line 67
The DCA files are mostly configuration files, they cannot have executable PHP code within them since an object reference such as $this will have no context.
Instead you can create class files within the file ( ie class myclass extends Backend{}) and then use the various callback arguments to call the relevant class.
Bookmarks