PHP 4.0 Bug #9798 Updated: Non-select statements always return false

From: Date: Fri, 16 Mar 2001 22:08:26 +0000
Subject: PHP 4.0 Bug #9798 Updated: Non-select statements always return false
Groups: php.dev 
Request: Send a blank email to php-dev+get-49146@lists.php.net to get a copy of this message
ID: 9798 User Update by: jhurshman@rocketmail.com Old-Status: Open Status: Duplicate Bug Type: MSSQL related Description: Non-select statements always return false Sorry, I see this is the same as bug #8402. Previous Comments: --------------------------------------------------------------------------- [2001-03-16 17:03:11] jhurshman@rocketmail.com Select statement do return true if they succeed. The output of this script is "yesno": <?php $db = mssql_connect("host", "user", "password"); $query = 'SELECT * FROM table_name'; $result = mssql_query($query); echo ($result) ? "yes" : "no"; $query = 'UPDATE table_name SET field_name = "text"'; $result = mssql_query($query); echo ($result) ? "yes" : "no"; ?> --------------------------------------------------------------------------- [2001-03-16 17:00:24] jhurshman@rocketmail.com <?php $db = mssql_connect("host", "user", "password"); $query = 'UPDATE table_name SET field_name = "text"'; $result = mssql_query($query); echo ($result) ? "yes" : "no"; ?> The output is "no", even though the update has actually occurred. This did not happen with 4.0.3pl1. It began happening when I upgraded to 4.0.4pl1. I used the "(CGI binary plus server API versions for Apache, AOLserver, ISAPI and NSAPI. MySQL support built-in, many extensions included, packaged as zip)" Win32 binary. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=9798

« previous php.dev (#49146) next »