Welcome Guest, Not a member yet? Register   Sign In
Inserting a mysql trigger via CI
#1

[eluser]Unknown[/eluser]
I want to create a database trigger with an CI statement.

If I insert my SQL-Statement in phpMyAdmin everything works fine. But if I try to insert the same sql-statement with CI a syntax error occured (CI 1.6 with Mysql). Even if I try to change the delimiter with $this->db->query('DELIMITER $$'); it doesn't work.

Is there a simple solution for this problem?. Or can I call a CI function which sends the statement directly to the database without modifications?

I read some posts where they call a stored procedure with CI. Is it possible to call a stored procedure with parameters and then the stored procedure creates my trigger?

Sample code:
DELIMITER $$
CREATE TRIGGER ......

DELIMITER ;

Best Regards,
Wolfgang




Theme © iAndrew 2016 - Forum software by © MyBB