Expects parameter 1 to be resource, boolean given
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6169146/php-warning-sort-expects-parameter-1-to-be-array-resource-given">PHP: Warning: sort() expects parameter 1 to be array, resource given </a>  </p>
</blockquote>



<p>Warning: mysql_error() expects parameter 1 to be resource, boolean given in /var/www/html/stockm/include/include.php on line 26</p>

<p>Transaction Fail :</p>

<pre><code>select p.ProductID as product_id, p.ProductName as product_name,c.categoryname as product_catgegory, p.ProductDescription as product_desc,p.saleprice as product_price,p.Discontinued as product_dis from sm_products p inner join sm_category c on p.CategoryID=c.categoryid inner join sm_stockin si on si.productid=p.ProductID where (p.datedel='' or p.datedel is null) and p.active=1
</code></pre>

<p>Error Detials</p>

<pre><code>Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/html/stockm/include/include.php on line 100
</code></pre>

<hr>

<p>code:</p>

<pre><code>$stmt = mysql_query($SQLStr); 
if(!$stmt) 
{ 
     echo "Transaction Fail : &lt;br/&gt;" . mysql_error($stmt) . "&lt;br/&gt;" . $SQLStr ; 
}
$row = mysql_fetch_array($stmt,MYSQL_BOTH); 
</code></pre>
