Reputation: 61
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
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