note 41616 deleted from function.mssql-query by cmb

From: Date: Sun, 23 Jun 2019 14:24:27 +0000
Subject: note 41616 deleted from function.mssql-query by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211375@lists.php.net to get a copy of this message
Note Submitter: aleks [aleks AT linuxgalaxy DOT org] ---- 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

« previous php.notes (#211375) next »