我正在使用Codeigniter进行开发,当涉及到复杂的数据库查询时,我会使用。
然后使用
到目前为止,这非常好和有用。
现在我的问题是什么?
$this->db->query('my complicated query');
然后使用
$query->result();
将其转换为对象数组。到目前为止,这非常好和有用。
现在我的问题是什么?
what if I want to create mysql view and select from it? Will
$this->db->from('mysql_view')
take the mysql view as it's a table or not?
And if I do that will be any difference in performance are views faster than normal database query?
What would be best practice with Codeigniter and MYSQL database dealing with complicated queries as I understand that ActiveRecord is just query builder and as some tests it's even a little slower
$this->db->from('')
通常是否会接受视图名称? - Ahmed Gaber