I am trying the following code:
Your MySQL query possibly does not match any rows in the database.
Check the return value of mysql_query(), which returns "resource" on success and "false" on failure.
$query = "SELECT * FROM Auctions";
$result = mysql_query($query);
if ($result !== false) {
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach ($row as $field=>$value) {
echo $field . ':' . $value
}
}
} else {
// query returned 0 rows
}
As others also suggested, you can use mysql_error() to look if the query returns any mySQL errors