This is a very frustrating problem. I can't even get an error msg. I need to retrieve and display my database records. Would appreciate any help at all.
$query = "SELECT * FROM chesstable ORDER BY chapter, lastname";
$result = mysql_query($query) or die('Could not connect' . mysql_error());
echo mysql_num_rows($result);
If (!$result) {
$message = 'Invalid query: ' . mysql_error();
$message = 'Whole query: ' . $query;
die ($message);
}
while($row = mysql_fetch_assoc($result)) {
echo $row['firstname'] . " " . $row['lastname'] . $row['chapter'];
}
mysql_free_result($result);
mysql_close($dbc);
?>
MOD EDIT: PHP bbcode tags added.