i got this error when am doing this
and cantfind the problem
<?php session_start();
require "forum.inc.php";
if(!$logged_userID){
fail("not logged","true");
}
setup_page("Great Debate","Topic for debate");
$thread_per_page=12;
if(!$thread_list_offset){$thread_list_offset=1;}
$thread_list_offset +=$increment * $thread_per_page;
session_register("thread_list_offset");
$conn=mysqli_connect("localhost","root","","forum");
$query=mysqli_query($conn,
"select thread.title,thread.threadID ,MAX(posts.dateposted) as latest
from thread ,posts where thread.threadID =posts.threadID
group by thread.threadID order by desc
limit" .($thread_list_offset-1).",".$thread_per_page );
if(!$query){
fail("Query failed","true");
echo mysqli_error($conn);
}