我的模特:
function update_client1($student_profile_id,$update_data,$status)
{
$this->db->where('student_profile_id', $student_profile_id);
$query=$this->db->update('User_Profile',$update_data);
$this->db->where('status',$status) ;
$query=$this->db->update('User',$update_data);
$report = array();
$report['error'] = $this->db->_error_number();
$report['message'] = $this->db->_error_message();
if($report !== 0){
return true;
}else{
return false;
}
}
我在显示中收到以下错误:
发生数据库错误
错误号码:1054
“字段列表”中的未知列'firstname'UPDATE `User` SET `firstname` = 'minu1', `lastname` = 's12', `email` = 's@rw.m', `phone_number` = '0123654799', `city` = 'ahmedabad', `state` = 'gujarat', `country` = 'india', `subject_id` = '20' WHERE `status` IS NULL
文件名:C:\ xampp \ htdocs \ ekta \ example \ system \ database \ DB_driver.php
行号:330
我该如何解决这个问题?
答案 0 :(得分:0)
class Dashboard extends CI_Controller{
public function __construct(){
parent::__construct();
$this->load->model("admin/post_model");
$this->load->model("admin/comment_model");
}
public function index(){
$data['post_res'] = $this->post_model->getPost();
$data['com_res'] = $this->post_model->getComments();
}
}