1

I have function on the database named getDtails(id) using CREATE FUNCTION on mysql

I can call it from mysql using SELECT getDetails(10) which return aninteger.

i want to execute it from symfony 1.4 using doctrine.

1 Answer 1

1

You could do it like this :

Doctrine_Manager::getInstance()->getCurrentConnection()
       ->fetchAssoc('SELECT getDetails(10)');

You can replace fetchAssoc with fetchArray or fetchBoth as required.

Documentation of the Doctrine_Connection class is here

Sign up to request clarification or add additional context in comments.

1 Comment

Documentation link asking user name and password. what to do ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.