RE: [PHP] Stumped I Tell You!
| From: | Jay Blanchard | Date: | Fri, 25 Jul 2008 18:36:13 +0000 |
| Subject: | RE: [PHP] Stumped I Tell You! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277331@lists.php.net to get a copy of this message | ||
[snip]
[snip!]
>
> $endBal = mysql_fetch_array($dbEnd);
> echo mysql_num_rows($dbEnd);
> print_r($endBal);
>
> Nothing gets returned from those last statements. Am I missing
something
> completely?
Right here....
<?php
// Code before....
if(!$dbEnd = (mysql_query($getEnd, $dbc))){
echo mysql_error() . "\n";
exit();
}
// .... code after....
?>
You're merging assignment. Maybe you meant this:
<?php
if(($dbEnd = mysql_query($getEnd, $dbc)) === FALSE) {
echo mysql_error() . "\n";
exit();
}
?>
[/snip]
I have several other queries running in this example and they all use
the same run/error check routine with no issues. This has always worked
in the past. It is like saying if(!$theFile = fopen('myfile.txt', 'a'))