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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC