ID: 35493 Updated by: [EMAIL PROTECTED] Reported By: martin at malditainternet dot com -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: linux PHP Version: 4.4.1 New Comment:
Please check that you are using the same version (and protocol) of FreeTDS on all the different systems. This is the output with the latest CVS version of both FreeTDS and PHP: PHP: 5.1.0RC5-dev Query (select * from sysobjects where name='nonexistant') ret: Resource id #5 Previous Comments: ------------------------------------------------------------------------ [2005-11-30 16:53:09] martin at malditainternet dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35493&edit=1