#19015 [Opn->Bgs]: IF Statement fails in mssql_query()

From: Date: Fri, 23 Aug 2002 06:54:51 +0000
Subject: #19015 [Opn->Bgs]: IF Statement fails in mssql_query()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17612@lists.php.net to get a copy of this message
ID: 19015 Updated by: georg@php.net Reported By: joe.binnington@xko.co.uk -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: Windows 2000 PHP Version: 4.2.2 New Comment: If the second query doesn't work, it's a mssql problem. The PHP extension just sends the query via dbcmd call to the server, which executes the query. Previous Comments: ------------------------------------------------------------------------ [2002-08-21 07:20:17] joe.binnington@xko.co.uk This is not a support question. The second query should work but doesn't. It is not because the SQL is incorrect, it is because the mssql_query() function in php_mssql.dll does not process the second query correctly. ------------------------------------------------------------------------ [2002-08-21 07:15:27] jan@php.net Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. ------------------------------------------------------------------------ [2002-08-21 07:11:19] joe.binnington@xko.co.uk This query works: select * from tablename ...but this query doesn't: if (1=1) select * from tablename Apparently, in the second query, two results are returned, the first is empty, the second is the correct result set. I know that I could put the IF statement directly into PHP but there are good reasons why we need them to work within the SQL statement. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19015&edit=1

« previous php.bugs (#17612) next »