Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Jaunelio Klausimai :)

Parašė edeni· 2009 Lap. 9 18:11:44
#139

$result = dbquery(
   "SELECT tf.*, tt.*, tu.user_id,user_name, MAX(tp.post_id) as last_id, COUNT(tp.post_id) as count_posts FROM ".$db_prefix."forums tf
   INNER JOIN ".$db_prefix."threads tt USING(forum_id)
   INNER JOIN ".$db_prefix."posts tp USING(thread_id)
   INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
   WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads']."");