Select SQL CodeIgniter
Estou tentando fazer esse select em 2 tabelas utilizando CodeIgniter porem está retornando vazio.
$this->db->select('*');
$this->db->from('lectures AS lec, categories AS cat');
$this->db->order_by("title", "ASC");
$this->db->where("lec.categories_id", "cat.id");
return $query = $this->db->get();
var_dump retorna:
SELECT * FROM `lectures` AS `lec`, `categories` AS `cat` WHERE `lec`.`categories_id` = 'cat.id' ORDER BY `title` ASCDiscussão (2)
Carregando comentários...