This is a simple bit of code that should display the records from the 'members' table, and in fact i have used pretty much exactly the same code for other tables on other pages, and it works fine, but this code seems to keep producing this error :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/the-coff/public_html/maitland2/member.php on line 39
Here is the code:
<table colspan = 7 cellpadding = 7 border = 0>
<tr><th>First Name</th><th>Surname</th><th>Date Of Birth</th><th>Postcode</th>
<th>Telephone(H)</th><th>Telephone(W)</th><th>Telephone(M)</th></tr>
<?php
$db = mysql_connect("localhost", "the-coff", "frog66");
mysql_select_db("the-coff_maitland",$db);
$select = mysql_query("SELECT * FROM member;", $db);
while ($myrow = mysql_fetch_array($select))
{
printf ("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
$myrow["first_name"], $myrow["surname"], $myrow["date_of_birth"], $myrow["postcode"],
$myrow["telephoneH"], $myrow["telephoneW"], $myrow["telephoneM"]);
}
?>
</table>