Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Stored Procedures with Symfony and Doctrine

I having problems at trying to call a MySQL Stored Procedure with Symfony 1.4 and Doctrine 1.2. What I want to do is the following:

In a module/new after typing all the data in the form, I want to insert one of the values in another table.

I don't know if this can be done with Doctrine without using a stored procedure.

Thanks for your help.

like image 664
ricardojguzman Avatar asked Jul 07 '10 20:07

ricardojguzman


1 Answers

You could use triggers but I'm not sure how advanced they are in MySQL. Triggers wouldn't involve any coding in Doctrine, symfony nor PHP. Just stored procedures.

You can achieve pretty similar effect with Doctrine's record listeners or record hooks.

like image 164
Jakub Zalas Avatar answered Nov 14 '22 03:11

Jakub Zalas