|  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
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
 [1998-07-17 18:02 UTC] richard at exaflop dot org
if (msql_connect("localhost") == false):
    echo "Could not connect to RDBMS<BR>";
$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.


Add a Patch

Pull Requests

Add a Pull Request


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-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 21:03:34 2022 UTC