note 41616 added to function.mssql-query

From: Date: Fri, 16 Apr 2004 17:39:21 +0000
Subject: note 41616 added to function.mssql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-68215@lists.php.net to get a copy of this message
Just in case anyone is having problems with mssql_query calling a procedure, where the procedure has multiple SELECTs, INSERTs and/or UPDATEs and some do not return any kind of a result, but some do. When trying to run mssql_query in that case an error: "Warning: mssql_fetch_array(): 1 is not a Sybase result index in ..." would result, or if one uses something like "SELECT @@IDENTITY" to return something for those statements an error: "Expected dbnextrow() to return NO_MORE_ROWS." would result. A simple fix for the error(s) is to use "SET NOCOUNT ON" statement before any statements that do not return anything and then "SET NOCOUNT OFF" before any statements that do. --Aleks ---- Manual Page -- http://www.php.net/manual/en/function.mssql-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41616 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41616&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41616&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68215) next »