I am having problem with PHP executing SQL Stored Procs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • focusbizla
    New Member
    • Jun 2008
    • 1

    I am having problem with PHP executing SQL Stored Procs

    Hello,

    I am new to PHP

    I have a t-sql based stored procedure which I want to execute via PHP, I have tried all odbc_prepare, odbc_execute and odbc_exec but somehow I have not been able to execute the SP.

    The SP is perfectly fine as it executes properly from SQL API.

    Is there a PHP setting that I need to turn on / enable for this?

    Thanks in advance for your help
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    I thought it was as simple as:
    [code=php]
    $dbLink = odbc_connect($h ost, $user, $passwd);
    $result = odbc_exec($dbLi nk, "exec MyProcedure");
    [/code]
    Have you checked if there are functions native to your database type?
    Which type of database are you using, by the way?

    Comment

    Working...