The code below when ran, gives me an error on the while line. can anybody help me out with why it stops at this point and gives me this error: not a valid MySQL result resource .
Thanks
$bandbh = mysql_connect($host, $user, $pass);
mysql_select_db($name);
$banstmt = "SELECT * FROM $tableimages ORDER BY imageloc";
$bansth = mysql_query($banstmt, $bandbh);
while ($banrow = mysql_fetch_array($bansth, MYSQL_ASSOC)) {
Print"\n<br>";
echo $banrow["imageloc"];
}
//mysql_free_result ($bansth);
mysql_close ($bandbh);