function get_authName($AID) {
include("includes/config.inc.php");
$sql = "SELECT * FROM diary_user_table WHERE ID = ". $AID;
$result = mysql_query($sql);
$authname_information = mysql_fetch_array($result);
return $authname_information['Username'];
}
function get_titleName($AID) {
include("includes/config.inc.php");
$sql = "SELECT * FROM diary_config_table WHERE AuthorID = ". $AID;
$result = mysql_query($sql);
$title_information = mysql_fetch_array($result);
return $title_information['SiteTitle'];
}
function get_ReadCount($read) {
include("includes/config.inc.php");
$sql = "SELECT AuthorID,sum(ReadCount) from diary_diary_table group by AuthorID order by ReadCount DESC = ". $read;
$result = mysql_query($sql);
}
function get_totalComment($diary_id) {
include("includes/config.inc.php");
$sql = "SELECT * FROM diary_comment_table WHERE DiaryID = ". $diary_id;
$result = mysql_query($sql);
$matched = mysql_num_rows($result);
$sql2 = "select * from diary_diary_table AuthorID order by ReadCount DESC ";
$result2 = mysql_db_query($db_name,$sql2) or die("Failed SQL Query 2");
$result2=pu_query($db_name,$sql2,40); // pu
while ($row2 = mysql_fetch_array($result2))
{