prod env added
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class userCalendar extends baseModel
|
||||
{
|
||||
// protected $db;
|
||||
// public $con_name = 'mermsemr';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// $this->db = \Config\Database::connect($this->con_name);
|
||||
}
|
||||
|
||||
public function readCalendar($in)
|
||||
{
|
||||
$member_id =
|
||||
(isset($in['member_id']) && (int)$in['member_id'] > 0)
|
||||
? (int)$in['member_id']
|
||||
: 0;
|
||||
$sqlQ = "SELECT 'REMINDER' AS cal,description,start_date,category,uuid FROM members_reminders
|
||||
WHERE member_id = $member_id AND start_date BETWEEN '".$in['start_date']."' AND '".$in['end_date']."' ";
|
||||
$query = $this->db->query($sqlQ);
|
||||
$data['reminders_data'] = $query->getResultArray();
|
||||
return $inx = [
|
||||
'reminders' => $data['reminders_data'],
|
||||
'status' => 1,
|
||||
'raw_data' => $in,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
public function update_db($UupdateDataArray,$whereAray, $updateTable)
|
||||
$sql = "INSERT INTO table (title) VALUES('" . $db->escapeString($title) . "')";
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user