<?php
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);
chdir(FCPATH);
require FCPATH . '../app/Config/Paths.php';
$paths = new Config\Paths();
require $paths->systemDirectory . '/Boot.php';
// Boot the CLI
class CLIBridge extends \CodeIgniter\Boot {
    public static function run($paths) {
        static::initialize($paths);
        static::defineCommandLineConstants();
        static::registerAutoloader();
    }
}
CLIBridge::run($paths);

$db = \Config\Database::connect();
$query = $db->table('services')->get();
foreach($query->getResultArray() as $r) {
    echo $r['id'] . ' | ' . $r['title'] . ' | ' . $r['image_path'] . "\n";
}
unlink(__FILE__);
