如何在codeigniter查询中包含一个实际不在数据库中的列?

时间:2014-12-09 05:36:33

标签: mysql codeigniter

我们可以在sql中实现这一点。



$this->db->select('mytype as type');




{select 'mytype' as type from mytype}

如何在codeigniter中实现这一目标? 我试过了

{$this->db->select('mytype as type');}

1 个答案:

答案 0 :(得分:0)

试试这个。

$this->db->select('"mytype" as type', FALSE);

OR

$this->db->select('mytype as type', FALSE);