I want a list of all threads of the forum ID I'm viewing, but I also want to get information about the forum I'm viewing, like name and description. My query wont work:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in forum.php on line 11
How would I join in my forums table in this query?
$tresult = mysql_query("SELECT * FROM threads WHERE threads.forumID = ".intval($_GET['forumID'])." LEFT JOIN forum ON forum.id = threads.forumID");
// does the forum even exist?
if (mysql_num_rows($tresult) < 1) {
// Show error and return
echo "The forum you are looking for appears to be missing.";
return false;
}
if ($is_l
My tables:
forum
: id, name, descriptionthreads
: id, forumID, title, body, date