Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
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` ASCCarregando comentários...