1234567891011121314151617181920212223242526272829 |
- <?php
- if (!defined('BASEPATH'))exit('No direct script access allowed');
- include_once(FCPATH . 'application/models/Base_model.php');
- class Modbus_load_model extends Base_model {
- protected $table = 'modbus_load_param_cmd';
- public function __construct() {
- parent::__construct();
- }
- public function get_data_by_filter($where){
- if (empty($where)) {
- return array();
- }
- $this->db->select('*');
- foreach ($where as $k => $v) {
- if (is_array($v)) {
- $this->db->where_in($k, $v);
- } else {
- $this->db->where($k,$v);
- }
- }
- $query = $this->db->get($this->table);
- return $query->row_array();
- }
- }
- ?>
|