Changed generating lastpost in topic and forum.
git-svn-id: https://svn.pioder.pl/uf-svn/uF@19 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
4
includes/cache/cache_index.php
vendored
4
includes/cache/cache_index.php
vendored
@@ -15,7 +15,7 @@ if(!defined('IN_uF'))
|
||||
//cache forums and posts - version v1.0 Alpha 2---------------------------------
|
||||
//
|
||||
//lastpost in forum cache
|
||||
$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".POSTS_TABLE.".u_id = ".USERS_TABLE.".u_id GROUP BY `f_id`, `ptime` ORDER BY `ptime`";
|
||||
/*$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".POSTS_TABLE.".u_id = ".USERS_TABLE.".u_id GROUP BY `f_id`, `ptime` ORDER BY `ptime`";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain last post in topic', true);
|
||||
$post_count = @mysql_num_rows($query);
|
||||
while($result = @mysql_fetch_array($query))
|
||||
@@ -26,7 +26,7 @@ while($result = @mysql_fetch_array($query))
|
||||
$last_post[$result['f_id']]['time'] = $result['ptime'];
|
||||
$last_post[$result['f_id']]['user_rank'] = $result['rank'];
|
||||
$last_post[$result['f_id']]['user_nick'] = $result['nick'];
|
||||
}
|
||||
}*/
|
||||
//cache forums --don't modify!!!
|
||||
$cache_id=1;
|
||||
$sql = "SELECT ".FORUMS_TABLE.".*, COUNT(".POSTS_TABLE.".p_id) as amout, ".POSTS_TABLE.".f_id AS count FROM ".FORUMS_TABLE." LEFT JOIN ".POSTS_TABLE." ON ".FORUMS_TABLE.".f_id= ".POSTS_TABLE.".f_id GROUP BY `f_id` ORDER BY `c_id`, `sort`";
|
||||
|
||||
Reference in New Issue
Block a user