1:增:
$data=array();
$data['e_type'] = $e_type; // 状态
$data['e_info'] = $e_info; //编码
$data['e_name'] = $e_name; //名称
$data['optime']=date("Y-m-d H:i:s",time()); //时间
// //把表里的数据添加到数据库
$res=$this->db->insert('empa_kq_wh', $data);
2:查询:
//备案列表
public function recordList(){
if(IS_POST){
$search=$this->input->post('search');
if(!empty($search)){
$e_info=explode(',', $search);
$data['result']=$this->db
->select("id,e_type,e_info,e_name,optime")
->from("empa_kq_wh")