123456789101112131415161718192021222324252627282930313233 |
- <?php
- if (!defined('BASEPATH'))exit('No direct script access allowed');
- include_once(FCPATH . 'application/models/Base_model.php');
- class Feedback_model extends Base_model {
- protected $table = 'feedback';
- public function __construct() {
- parent::__construct();
- }
-
- public function queryData($usernames){
- if (!empty($usernames)) {
- $this->db->where_in('username', $usernames);
- }
- $this->db->order_by("status","asc");
- $query = $this->db->get($this->table);
- return $query->result_array();
- }
-
- public function delBatch($data, $field = 'id'){
- $this->db->where_in($field, $data);
- $this->db->delete($this->table);
- if ($this->db->affected_rows()) {
- return true;
- } else {
- return false;
- }
- }
- }
- ?>
|