fetch_array error
Posted: Sun Sep 12, 2004 12:54 am
Code: Select all
$sql = "(SELECT author FROM threads) UNION ALL (SELECT author FROM topics) WHERE tid='$newtid'";
$result = mysql_query($sql,$con);
while($row = mysql_fetch_array($result)) { <-- ERRORS HERE
$author = $row['author'];
$sql = "SELECT email FROM users WHERE user='$author'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
$email = $row['email'];
echo $email;
echo "</p>";
}
}This is the error.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Thank you for your help