Replies: 1 comment
-
Phalcon does not have native support for stored procedures. You could use the custom dialect feature as described here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to call stored procedures written in My SQL in Phalcon?
When I try to execute my stored procedure like:
ControllerBase::getInstance("CALL mayorToDistrict($md->party_id,$partyName,$md->district_id,$districtName,$md->candidate_type_id,$md->win,$md->leaded)")->execute();
It throws an error
Caught Excpetion:Syntax error, unexpected token IDENTIFIER(CALL), near to ' mayorToDistrict(3,'एमाले /CPN-UML',62,'डोल्पा / Dolpa',1,4,0)', when parsing: CALL mayorToDistrict(3,'एमाले /CPN-UML',62,'डोल्पा / Dolpa',1,4,0) (88)
It seems phalcon is not able to recognize CALL
I even tried wrapping it in quotes like:
$sql="CALL
mayorToDistrict
('$md->party_id','$partyName','$md->district_id','$districtName','$md->candidate_type_id','$md->win','$md->leaded');";and then calling it like
ControllerBase::getInstance($sql)->execute();
but it throws the same exception.
Beta Was this translation helpful? Give feedback.
All reactions