hey devs,i have some troubles, i want to ask how to use where and join in codeigniter. take a look below my code:
public function fetchOne($condition){
$this->db->select('logistics_tpl.id,logistics_tpl.name as tpl_name,logistics_tpl.s_id,logistics_tpl.l_id,logistics_tpl.fee,logistics_tpl.remark,logistics_tpl.status,logistics.name,logistics.code');
$this->db->from($this->_table);
$this->db->join($this->_table_related,'logistics_tpl.l_id = logistics.id ','inner');
// FIXME
$this->db->where($condition);
return $this->db->get()->row_array();
}
if i do this,but i get errors. what can i do? thanks, i'm sorry for my english.