how to use where and join condition together in codeigniter ?

9 views
Skip to first unread message

Cho Myeong

unread,
May 13, 2016, 1:34:36 AM5/13/16
to codeigniter
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.

Marco Monteiro

unread,
May 13, 2016, 4:37:35 AM5/13/16
to mme...@gmail.com, codeigniter
I wish I could help, but.... what errors?

--
You received this message because you are subscribed to the Google Groups "codeigniter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codeigniter...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Reply all
Reply to author
Forward
0 new messages