I'll back that up, I ended up having to reboot constantly to clear out a
stalled IIS service.
Two problems with stored procedures, no return value and no output
parameters. You'll need to reformat all your procedures to have a SELECT
statement return those values.
I've been told that the 4.0.6 (as of yet unreleased) version has better
support for stored procedures. You might want to grab it from CVS and
compile before you go and modify a bunch of stuff on the SQL server.
Here's an example I pulled from one of my pages, it could probably use
some more error handing but it'll give you an easy place to start.
$connection = mssql_connect(DB_SERVER, DB_USER, DB_PASS);
mssql_select_db(DB_NAME);
$query_result = mssql_query("EXEC p_delete_picture '$username',
'$password', $pic_id;");
if ($query_result==FALSE) die("query failed");
$obj = mssql_fetch_object($query_result);
if ($obj==FALSE) die("query failed");
//read out your return values
mssql_free_result($query_result);
mssql_close($connection);
-----Original Message-----
From: Pavel Kalian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 06:01
To: [EMAIL PROTECTED]; Scott
Subject: Re: [PHP-WIN] SQL Server stored procedures and functions
It sure can.
example: $result = mssql_query("execute your_proc '$your_var',
$another_var");
note that you will probably have to go with the CGI version under IIS as
the
ISAPI one is EXTREMELY unstable when used with MS SQL Server in my
experience.
Pavel
----- Original Message -----
From: "Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 22, 2001 2:54 PM
Subject: [PHP-WIN] SQL Server stored procedures and functions
> Hi-
>
> I was using PHP on WinNT at my old job, when they closed I took this
> new job where everything is/was done in ASP 3.0. Now I have been
> told that I am welcome to explore other options--translation, I can
> use PHP again :)
>
> This db they have set-up does a ton of stored procedures and functions
> in SQL Server 2000. I am wondering if anyone knows--can PHP call a
> stored procedure or function from SQL Server? Can you point me to any
> examples?
>
> Thanks in advance.
>
> -sap
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]