How to access sqlite db with kirby

Kind members answered a question about a database problem. Currently using MAMP to test accessing a sqlite db along with Kirby. I am having difficulty extracting any data from the database. Looked at the toolkit but need a bit of help still. Created a simple page just to test output. Can someone pinpoint how to access my sqlite db?? I assume i know i need to access the total db but just need the syntax. DB in applications/mamp/db/sqlite/tlfpsupport.sqlite thanks

<?php snippet('header') ?>
<?php snippet('menu') ?>
  <div>
<h1 class="headline-brd"><?php echo 'TL'; echo $page->title()->html() ?></h1>
<h4><?php echo $page->text()->kirbytext() ?> </h4>
</div>
<?php  $fpsupport = $db->table('fpsupport'); ?>
<?php echo $fpsupport->count(); ?>
<div>
<h4><?php echo $page->text()->kirbytext() ?> </h4>
</div>
<?php snippet('footer') ?>

db had to be in kirby folder.
works

1 Like