Does anyone see something wrong with the while loop below? It's only returning 1 string, when there are in fact more than 10.
PHP Code:
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,forumid FROM thread WHERE visible=1 $wheresql AND open=1 ORDER BY lastpost DESC LIMIT 10");
while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$date2 = date ("m/d/y h:i A" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
$output = "$title";
}