为什么我在查询似乎工作时收到 500 Internal Server error 的错误状态代码?
这是我发现的,当我->result();
在查询中删除它时,它返回状态 200,这很好。但是,如果我->result();
在查询中添加它会给我内部服务器错误。
这是我的查询:
$this->db->select('message_tbl.id, message_tbl.message, message_tbl.date_created, message_sent.from_id, message_received.to_id, message_received.is_read');
$this->db->from('message_tbl');
$this->db->join('message_received', 'message_received.msg_id = message_tbl.id');
$this->db->join('message_sent', 'message_sent.msg_id = message_tbl.id');
$this->db->where('message_sent.delete_status',0);
$this->db->where('message_received.delete_status',0);
$this->db->where('message_received.to_id',$this->user_id);
$this->db->where('message_received.parent_id',0);
$query = $this->db->get()->result();