PART 1:
See [login to view URL]
In app/application/config/[login to view URL], You will find config file to connect script to DB.
It use:
$db['default']['dbprefix'] = '';
and
$db['default']['swap_pre'] = '';
But if I change prefix in database and in this file it doest work.
See screenshot
[login to view URL]
It happened because in code don’t use prefix for query to DB. See part of code:
$query = "SELECT `user`.`id`,`user`.`name` as `name`,`email`,`user`.`accesslevel`,`accesslevel`.`name` as `access` FROM `user`
INNER JOIN `accesslevel` ON `user`.`accesslevel` = `accesslevel`.`id`
WHERE `email` LIKE '$username' AND `password` LIKE '$password' AND `status`=1 AND `accesslevel` IN (1,2) «;
So I need make this code query to DB with prefix.
PART 2:
I neet to use variable prefix in database.php. We can take prefix from folder name.
[login to view URL]
Point is I need when I make new blog using BlockThemplate pluginn, new blog will have new DB tables of app script and script will be connect to new DB prefix.