Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in .. Then my line
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a>  </p>
</blockquote>



<p>There are a bunch of pages to this file.  I have included all of the code so hopefully it can help.  Also I split code so you can see exactly where the errors.  </p>

<p>Any help you can provide would be wonderful.  </p>

<p>This is my function that is in the bankaccount.class file </p>

<pre><code>     /*Retrieve Current Balance*/
     public function retrieve_current_balance(){
         $balance_query = "SELECT CurrentBalance FROM BankAccount WHERE     BankAccountID = " . $this-&gt;accountid .  "LIMIT 0,1";
         $result = mysqli_query($this-&gt;connection, $balance_query);

         return $result;
 }
</code></pre>

<p></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Results Page&lt;/title&gt;
&lt;link rel=stylesheet type="text/css" href="../style.css"&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;link href="../style.css" rel="stylesheet" type="text/css"&gt;
&lt;link rel=stylesheet type="text/css" href="../navigation.css"&gt;


&lt;/head&gt;


&lt;body bgcolor="#999999" bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0"&gt;
&lt;center&gt;&lt;table width="765" height="100%" cellpadding="0" cellspacing="0" border="0" background="img/mainbackground.jpg"&gt;&lt;tr valign="top"&gt;&lt;td&gt;

&lt;div class="shadow"&gt;

&lt;?php require_once('../header.inc.php'); ?&gt;






&lt;table width="764" height="97" cellpadding="0" cellspacing="0" border="0"&gt;
&lt;/table&gt;
&lt;table width="764" height="42" cellpadding="0" cellspacing="0" border="0"&gt;
&lt;tr valign="top"&gt;
&lt;td width="169"&gt;&lt;img src="img/left1.jpg" width="169" height="42" border="0" alt=""&gt;&lt;/td&gt;
&lt;td width="100%" background="img/left1bg.jpg"&gt;&lt;img src="img/left1bg.jpg" width="20" height="42" border="0" alt=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;table width="764" cellpadding="0" cellspacing="0" border="0"&gt;
&lt;tr valign="top"&gt;
&lt;?php 

require_once('../footer_nav/navigation.inc.php');   
require_once('../websiteconfig.inc.php');
require_once('../class/person.class.php');
require_once('../class/database.class.php');
require_once('../class/bankaccount.class.php');

/*Start Session*/
session_start();

$currentMember =unserialize($_SESSION['currentMember']);

/*DataBase*/
$db = new Database;
$conn = $db-&gt;connection;
?&gt;
&lt;td width="16"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td width="595"&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/div&gt;


&lt;h2&gt;Accounts&lt;/h2&gt;  


&lt;/td&gt;
&lt;table id="accounts" summary="Bank Account Balance Information"&gt;
&lt;thread&gt;
    &lt;tr&gt;
        &lt;th&gt;Account Number&lt;/th&gt;
        &lt;th&gt;Account Balance&lt;/th&gt;
     &lt;/tr&gt;
  &lt;/thead&gt; 
&lt;tbody&gt;     
&lt;?
/*Accounts*/
$currentMember-&gt;connection = $conn;
$accounts = $currentMember-&gt;retrieve_all_accounts();

/* Loop Though Accounts*/
while($account = mysqli_fetch_assoc($accounts)) {
/* Retrieve Account Balance*/
$bankaccount = new Bankaccount ($account['BankAccountID']);
$bankaccount-&gt;connection = $conn;
</code></pre>

<p>This is where I am getting error</p>

<pre><code>    $balance = mysqli_fetch_assoc($bankaccount-&gt;retrieve_current_balance());

 echo '&lt;tr&gt;' . "\n";
 echo "\t" . '&lt;td class="account_number"&gt;' . $account['BankAccountID'] . '&lt;/td&gt;' . "\n";
 echo "\t" . '&lt;td class="account_balance"&gt;$' . number_format($balance['CurrentBalance'], 2) . '&lt;/td&gt;' . "\n";
 echo '&lt;/tr&gt;' . "\n";

}

/*Closed DataBase*/ 
mysqli_close($db-&gt;connection);

?&gt;

&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/table&gt;&lt;/center&gt;

&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;?php require_once('footer.inc.php'); ?&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
