39 lines
817 B
PHP
39 lines
817 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class myfitUserReminders extends Model
|
|
{
|
|
protected $db;
|
|
public $con_name = 'mermsemr';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
//$db = \Config\Database::connect('mermsemr');
|
|
$this->db = \Config\Database::connect($this->con_name);
|
|
}
|
|
|
|
public function readReminders($in)
|
|
{
|
|
$reminder_category =[];
|
|
$sqlQ =
|
|
'SELECT * FROM members_reminders';
|
|
|
|
|
|
$query = $this->db->query($sqlQ);
|
|
$data['reminders_data'] = $query->getResultArray();
|
|
return $inx = [
|
|
'reminder_category' => $reminder_category,
|
|
'reminders' => $data['reminders_data'],
|
|
'status' => 1,
|
|
'raw_data' => $in,
|
|
];
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|