hestn
hestn

Reputation: 61

Mysql "CREATE VIEW" in Codeigniter

I want to make this mysql syntax in CodeIgniter:

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

so that if the view has been successful made, make an additional CREATE VIEW from those table generated by previous CREATE VIEW.

Upvotes: 4

Views: 4305

Answers (1)

Raza Rafaideen
Raza Rafaideen

Reputation: 2241

USE

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

This will work.

Upvotes: 1

Related Questions