Mysql"创建视图"在Codeigniter

时间:2014-09-30 07:32:56

标签: mysql codeigniter

我想在CodeIgniter中使用mysql语法:

CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition

以便在视图成功完成后,从之前的CREATE VIEW生成的表格中再添加一个CREATE VIEW

1 个答案:

答案 0 :(得分:1)

USE

$this->db->query('CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition');

这样可行。