mysql_fetch_row() expects parameter 1 to be resource, boolean given in - on line 29
<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>I have no experience with PHP if anyone can help solve this error it would be greatly appreicated. </p>

<pre><code>mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query="SELECT cemeterynum, stonenum FROM ccgs.lots where id ='$_GET[id]'";

$result=mysql_query($query);
$row = mysql_fetch_row($result);

$stones_dir = "$DOCUMENT_ROOT"."stones/$row[0]/";    
//directory where stones  images      are located

foreach (glob("$stones_dir$row[0]-$row[1]*") as $filename1) 
// find matching stone  images and display them
{
echo "&lt;img src=\"$filename1\" vspace=1 align=top title=\"$filename1\"&gt;  ";
}
</code></pre>
