Call stored procedure (firebird database) with php

2019-09-06 17:42发布

I have some stored procedures on a firebird database. Now I want to call them with PHP.

SP have a suspend code and a return value and the SP need some input parameters.. Can someone help me...

1条回答
霸刀☆藐视天下
2楼-- · 2019-09-06 17:56

Firebird doesn't have CALL syntax. How to call the SP depends on whether it is selectable (has a SUSPEND statement in it's body) or not. To call selectable SP you use SELECT statement:

select outParam1, outParam2 from mySP(:inParam1, :inParam2)

The selectable SP returns resultset which can be treated as one resulting from an "ordianary" select statement.

To call non-selectable SP you use EXECUTE PROCEDURE:

EXECUTE PROCEDURE mySP(:inParam1, :inParam2) RETURNING_VALUES(:out1, :out2)
查看更多
登录 后发表回答