Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
23
application/models/station_schedule_model.php
Normal file
23
application/models/station_schedule_model.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class station_schedule_model extends MY_Model
|
||||
{
|
||||
private $table = 'app_station_schedule';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function findSchedulesByCategoryIdAndDayName($categoryId, $dayName)
|
||||
{
|
||||
return $this->rest->db->where('categoryId', $categoryId)->where('dayName', $dayName)->get($this->table);
|
||||
}
|
||||
|
||||
public function insertSchedules($categoryId, $dayName, $data) {
|
||||
$this->rest->db->where('categoryId', $categoryId)->where('dayName', $dayName)->delete($this->table);
|
||||
$this->rest->db->insert_batch($this->table, $data);
|
||||
return $this->rest->db->affected_rows();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user