From:             [EMAIL PROTECTED]
Operating system: WinNT 5.0
PHP version:      4.2.0
PHP Bug Type:     MSSQL related
Bug description:  MSSQL fails to open a SP using a cursor on query that contains an 
expression

The MSSQL extension fails to even open (using mssql_query) a query on a
stored procedure that uses a cursor on a query containing an expression. 
The following SP works fine in Query Analyser (MSSQL7) but will not get
past the mssql_query line in PHP.  The occurrence of the expression "id +
1" is, bizarrely, the apparent cause of the problem.  Changing this to
just "id" makes it all work from PHP.

------------

CREATE PROCEDURE TestCursor AS

--This makes no difference:
-- set nocount on

declare c scroll cursor for
select id + 1 as newid from table

open c
fetch next from c

while (@@fetch_status = 0)
  fetch next from c

close c
deallocate c

-- set nocount off

-- 
Edit bug report at http://bugs.php.net/?id=17068&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17068&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17068&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17068&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17068&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17068&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17068&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17068&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17068&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17068&r=globals

Reply via email to