Query to get threads ?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Query to get threads ?
Are you trying to count the number of threads in a forum?

You need to put the fid of the thread in the query.  Please learn how to write SQL queries...

Probably not what you want:

PHP Code:
1
2
3
4
5
6
		$query = $db->query("
			SELECT tid , subject 
			FROM " .TABLE_PREFIX. threads." 
			WHERE tid=".$thread['tid']."
			ORDER BY tid
			DESC LIMIT 5");


My Blog
08-18-2010 07:36 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Query to get threads ? - Imran - 08-18-2010, 07:02 AM
RE: Query to get threads ? - ZiNgA BuRgA - 08-18-2010 07:36 AM
RE: Query to get threads ? - Imran - 08-18-2010, 04:42 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-18-2010, 07:38 PM
RE: Query to get threads ? - Imran - 08-18-2010, 09:53 PM
RE: Query to get threads ? - FBI - 08-21-2010, 08:36 PM
RE: Query to get threads ? - Imran - 08-21-2010, 09:01 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-21-2010, 10:13 PM
RE: Query to get threads ? - FBI - 08-22-2010, 01:06 AM
RE: Query to get threads ? - ZiNgA BuRgA - 08-22-2010, 08:44 AM
RE: Query to get threads ? - FBI - 08-22-2010, 06:19 PM
RE: Query to get threads ? - ZiNgA BuRgA - 08-22-2010, 09:54 PM

 Standard Tools
Forum Jump: