php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #558 msql() returns no result [true or false].
Submitted: 1998-07-17 18:02 UTC Modified: 1998-07-17 19:31 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: richard at exaflop dot org Assigned:
Status: Closed Package: mSQL related
PHP Version: 3.0.1 OS: Linux 2.0.32
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: richard at exaflop dot org
New email:
PHP Version: OS:

 

 [1998-07-17 18:02 UTC] richard at exaflop dot org
---->
if (msql_connect("localhost") == false):
    echo "Could not connect to RDBMS<BR>";
endif;
$result = msql("richard", "INSERT INTO tNames ( firstname, lastname, age ) VALUES ( 'richard', 'whitely', 44 )" );
echo "INSERT result: $result <br>";
<----

If the query was badly formed or failed to execute for some other reason I would expect $result to be false, but instead it is unset. The echo statement following just prints "INSERT result:  <br>";

It would seem that not only is msql() not returning a result but is also failing entirely as when the relation is dumped there is no data.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-17 19:31 UTC] zeev
> The echo statement following just prints "INSERT result:  <br>";

That is exactly what it is supposed to do.  FALSE in PHP is usually returned in the form of an empty string.
You can check what's going wrong using 
echo msql_error();



 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 13:03:41 2021 UTC