#32018 [Fbk->Opn]: mssql_query() doesnt seem to return a postive result identifier on success
| From: | bobpilly at yahoo dot co dot uk | Date: | Fri, 18 Feb 2005 12:52:51 +0000 |
| Subject: | #32018 [Fbk->Opn]: mssql_query() doesnt seem to return a postive result identifier on success | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74267@lists.php.net to get a copy of this message | ||
ID: 32018
User updated by: bobpilly at yahoo dot co dot uk
Reported By: bobpilly at yahoo dot co dot uk
-Status: Feedback
+Status: Open
Bug Type: MSSQL related
Operating System: Fedora Core 3 2.6.10-1.760_FC3
PHP Version: 5.0.3
New Comment:
Hi
Thanks very much this worked with no problems at all.
Previous Comments:
------------------------------------------------------------------------
[2005-02-18 12:29:14] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
------------------------------------------------------------------------
[2005-02-18 12:19:41] bobpilly at yahoo dot co dot uk
Description:
------------
I have just upgraded to php 5.0.3 and a simple if statement based on
the identifier that worked with php 5.0.2 no longer works. I have now
downgraded back to php 5.0.2 and everything is working fine again. when
trying a print of $result in 5.0.2 i am returned a '1' character, when
trying the same in 5.0.3 the $result variable is empty.
I have checked the database and the query in running correctly and the
field is being updated.
May be a case that the function has changed and its not in the online
documentation yet?
Reproduce code:
---------------
$numero= mssql_connect($dbserver,$dbuser,$dbpass)
or die ("Unable to connect to database server");
$query = "update test_table set phonenum = '$phonenum' where ind =
'$ind'";
$result = mssql_query($query,$numero);
if($result){
print "update success!";
}
else{
print "update failure!";
}
Expected result:
----------------
update success!
Actual result:
--------------
update failure!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32018&edit=1