Connecting Tech Pros Worldwide Forums | Help | Site Map

I am having problem with PHP executing SQL Stored Procs

Newbie
 
Join Date: Jun 2008
Posts: 1
#1: Jun 24 '08
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's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#2: Jun 25 '08

re: I am having problem with PHP executing SQL Stored Procs


Hi.

I thought it was as simple as:
Expand|Select|Wrap|Line Numbers
  1. $dbLink = odbc_connect($host, $user, $passwd);
  2. $result = odbc_exec($dbLink,  "exec MyProcedure");
  3.  
Have you checked if there are functions native to your database type?
Which type of database are you using, by the way?
Reply