|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-30 20:46 UTC] fmk@php.net
[2005-12-08 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Description: ------------ The return value of mssql_query is different from version to version when there aren't rows to return. For example: PHP: 4.4.2RC2-dev (from snap) Query (select * from sysobjects where name='nonexistant') ret: 5 PHP: 5.0.5-3 (Debian) Query (select * from sysobjects where name='nonexistant') ret: Resource id #5 PHP: 4.4.1-0.dotdeb.3 (Debian - Dotdeb) Query (select * from sysobjects where name='nonexistant') ret: 1 PHP: 4.4.0-4 (Debian) Query (select * from sysobjects where name='nonexistant') ret: Resource id #5 Reproduce code: --------------- <? mssql_connect('HOST','USER','password'); mssql_select_db('TNS_1_3_SPIDER'); $q="select * from sysobjects where name='nonexistant'"; print 'PHP: '.phpversion()."\n"."Query ($q) ret: ".mssql_query($q)."\n"; ?> Expected result: ---------------- I would love to get 'Resources' instead of integers