Hello
I have an error of
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sites/yardleyhc.co.uk/public_html/index.php on line 24
resulting from the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>• Yardley Hockey Club •</title>
<meta name="keywords" content="yardley, hockey, league, mrha, small heath, co-op" />
<meta name="description" content="The Official Website of Yardley Hockey Club" />
<link href="style/2008.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" >
</head>
<body bgcolor="#FFFFFF">
<div align="center"> <div id="maincontent">
<div id="header"><img src="images/logo.gif" /><img src="images/yardley.png" /></div>
<div id="topnav">
Home
<?php
include_once('includes/connect.php');
$sql = ('SELECT * FROM `tbl_menu` WHERE parent_menu_id = 0');
$result = mysql_query($sql);
if(mysql_num_rows($result) < 1)
{
echo('Sorry, no results were found.');
}
else
{
while($row = mysql_fetch_array($result))
{
echo (' <a href="">'.$row[menu].'</a> ');
}
}
?>
<a href="forum/index.php">Forum</a>
</div>
<div id="submenu"></div>
<div id="maintext">
<div align="left">
Yardley Hockey Club has been awarded England Hockey Clubs 1st Accreditation. This award recognises the hard work put in by the Club to provide a safe, effective and child friendly club environment. Sport England will award a Clubmark accreditation. Clubmark is the generic award for 32 sports and is a nationally recognised accreditation.
</div>
</div>
<div><div id="footers">designed and hosted by <a href="http://www.bravo14.co.uk" target="_blank">bravo14.co.uk</a></div>
<div id="footer">© 2005-<?php echo date("Y") ?> Yardley Hockey Club</div></div>
</div>
</div>
</body>
</html>