如何将连接提示传递给编码点火器?
我想运行以下 SQL 查询:
SELECT t1.a, t2.b FROM t1
INNER HASH JOIN t2 on t1.id = t2.id
如何使用代码点火器运行上述查询?可以指定联接类型,但不能传入联接提示。
you can simply load database library and use below code to exicute join query
$this->db->select('t1.a,t2.b');
$this->db->from('t1');
$this->db->join('t2', 't1.id = t2.id','INNER'); //You can use multiple joins same like this
//$this->db->where('t1.id','123'); // if required use where tag
$query = $this->db->get()->result(); // $query conatin query result