note 90876 added to function.mssql-query
| From: | thewiglaf at gmail dot com | Date: | Thu, 14 May 2009 01:59:51 +0000 |
| Subject: | note 90876 added to function.mssql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154583@lists.php.net to get a copy of this message | ||
Note that although the documentations states that mssql_query will return "TRUE if no rows were
returned", it will still return an empty resource identifier for SELECT statements that do not
return any rows. This empty resource identifier will get dynamically typed as TRUE in a boolean
context. Only for queries that do not actually return rows (eg. insert, update, or delete) will
mssql_query return an actual boolean TRUE value.
We should use mssql_num_rows($resource) rather than $resource===TRUE for checking whether rows were
returned.
----
Server IP: 209.41.74.194
Probable Submitter: 128.111.101.178
----
Manual Page -- http://www.php.net/manual/en/function.mssql-query.php
Edit -- https://master.php.net/note/edit/90876
Del: integrated -- https://master.php.net/note/delete/90876/integrated
Del: useless -- https://master.php.net/note/delete/90876/useless
Del: bad code -- https://master.php.net/note/delete/90876/bad+code
Del: spam -- https://master.php.net/note/delete/90876/spam
Del: non-english -- https://master.php.net/note/delete/90876/non-english
Del: in docs -- https://master.php.net/note/delete/90876/in+docs
Del: other reasons-- https://master.php.net/note/delete/90876
Reject -- https://master.php.net/note/reject/90876
Search -- https://master.php.net/manage/user-notes.php