We are following the get started tutorial on github, all went well but we are stranded on the DB connection.
We have created the $db object:
$db=new DB\SQL(
'mysql:host=localhost;port=3306;dbname=liselore',
'jow',
''
);
And we have set up a controller:
$f3->route('GET /',
function($f3) {
$f3->set('result',$db->exec('SELECT achternaam FROM test1'));
$template = new Template;
echo $template->render('views/homepage.html');
}
);
$f3->run();
However, we get this error:
Internal Server Error
Fatal error: Call to a member function exec() on a non-object
• fatfree-master/index.php:32
I think the error relates to the $db object that is not set. However, we do have php-pdo set, i just checked via phpinfo().
Any help would be great, thx...