Skip to Content.
Sympa Menu

freetds - RE: calling stored procedure from php

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: calling stored procedure from php
  • Date: Wed, 13 Nov 2002 17:01:32 +0100


>
> Sorry about asking this simple question. I searched the archives
> and could not find what I needed.
>
> I need a simple php example of calling a mssql stored procedure that
> has an output parameter (NOT using mssql_init,mssql_bind or
> mssql_execute).
>
> Can someone help out?
>
> lance
>
>
> Business Quality Web Email,
> Group Scheduling, & Team Tools
> http://www.norada.com/save
>
For now store procedure handling are not supported directly.

But this can be done with work-around

Consider

CREATE PROCEDURE sp_Test
@i INT OUTPUT
AS
SET @i = 10
GO

You can call procedure with following statement

DECLARE @res INT
EXEC sp_Test @res OUTPUT
SELECT @res

and read result of store procedure with fetch

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page