Hi,
I get Invalid table: users when database is configured inside index.php like this:
<?php
require __DIR__ . '/kirby/bootstrap.php';
$kirby = new Kirby([
'db' => [
'host' => 'localhost',
'database' => 'dev',
'user' => 'root',
'password' => '',
],
]);
echo $kirby->render();
and called inside a template like this:
<?php
$users = Db::select('users', '*', null, 'email DESC');
foreach($users as $user){
echo $user->email();
}
but if I directly do the following inside the template file, it works like a charm:
<?php
Db::connect("mysql settings to connect");
// ... and the rest of my code
is it normal behavior or a 3.8.0 bug?