php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32018 mssql_query() doesnt seem to return a postive result identifier on success
Submitted: 2005-02-18 12:19 UTC Modified: 2005-02-18 13:58 UTC
From: bobpilly at yahoo dot co dot uk Assigned:
Status: Closed Package: MSSQL related
PHP Version: 5.0.3 OS: Fedora Core 3 2.6.10-1.760_FC3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bobpilly at yahoo dot co dot uk
New email:
PHP Version: OS:

 

 [2005-02-18 12:19 UTC] 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!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-18 13:52 UTC] bobpilly at yahoo dot co dot uk
Hi

Thanks very much this worked with no problems at all.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 07:05:52 2022 UTC