SQL fails
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #3
RE: SQL fails
I see, do you think this would work?

PHP Code:
1
2
3
4
5
6
    $query = $db->query("SELECT t.subject, t.tid, t.views, t.icon, t.prefix, l.installs
		FROM ".TABLE_PREFIX."threads t
		LEFT JOIN (SELECT pid, COUNT(lid) AS installs FROM ".TABLE_PREFIX."ratemf_log WHERE rid='1' GROUP BY pid) l ON (l.pid=t.firstpost)
		WHERE t.visible = '1' {$where} AND t.closed NOT LIKE 'moved|%'
		ORDER BY l.installs DESC, t.views DESC
		LIMIT 0,{$limit};");


$where holds the disabled forums list.

There are no visible errors now, just need to wait for posts being rated as installed.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 08-22-2012 01:08 PM by Sama34.)
08-22-2012 12:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
SQL fails - Sama34 - 08-22-2012, 09:13 AM
RE: SQL fails - ZiNgA BuRgA - 08-22-2012, 10:36 AM
RE: SQL fails - Sama34 - 08-22-2012 12:59 PM
RE: SQL fails - ZiNgA BuRgA - 08-22-2012, 02:13 PM
RE: SQL fails - Sama34 - 08-22-2012, 06:22 PM
RE: SQL fails - ZiNgA BuRgA - 08-23-2012, 08:32 AM
RE: SQL fails - Sama34 - 08-25-2012, 04:24 AM
RE: SQL fails - ZiNgA BuRgA - 08-25-2012, 11:30 AM
RE: SQL fails - Sama34 - 08-25-2012, 04:52 PM

 Standard Tools
Forum Jump: