Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Fuel\Tasks;
class Feedback
{
public function run()
{
\Config::load('db', true);
$total_income = DB::query('SELECT'.
. DB::expr('SUM(total)') .
'FROM `' . DB::table_prefix() . 'bookings`'.
'WHERE `user_id` = ' . $this->template->user_id . ' ' .
'AND `status` != "prospect" ' .
'AND `status` != "cancelled" ' .
'AND `status` != "refunded" '
)->execute()->as_array();