note 20580 added to function.mssql-query
| From: | arthur dot mcgibbon at btinternet dot com | Date: | Tue, 09 Apr 2002 00:01:37 +0000 |
| Subject: | note 20580 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28983@lists.php.net to get a copy of this message | ||
The mssql_execute etc. commands for stored procs do not seem to support a DATETIME type.
This means using mssql_query.
Now problems occur when you want to use parameters that have Input values and Output values. SQL
Server refuses to acknowledge the following...
declare @ret int, @i int
select @i = 25
exec @ret = testsp @Param1 = @i output
select @ret, @i
It doesn't like 2 select statements, even when the first is changed to "set".
To get round this, put the whole query into an exec command.
e.g.
mssql_query("exec('declare @ret int, @i int
select @i = 25
exec @ret = testsp @Param1 = @i output
select @ret, @i')"
This seems to work fine.
--
http://www.php.net/manual/en/function.mssql-query.php
http://master.php.net/manage/user-notes.php?action=edit+20580
http://master.php.net/manage/user-notes.php?action=delete+20580
http://master.php.net/manage/user-notes.php?action=reject+20580