php Štetjeartiklov - popravek

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Štetjeartiklov - popravek相关的知识,希望对你有一定的参考价值。

/**
 * Blog::getLatestArticles()
 * 
 * @return
 */
public function getLatestArticles()
{

$pager = Paginator::instance();
$pager->items_total = countEntries(self::mTable,"active",1);
$pager->default_ipp = $this->fperpage;
$pager->path = Url::Blog("blog", false, "?");
$pager->paginate_front();

$sql = "SELECT a.*, c.id as cid, c.name".Lang::$lang." as catname, a.title".Lang::$lang." as atitle, c.slug as catslug, u.username, CONCAT(u.fname,' ',u.lname) as fullname,"
. "\n (SELECT COUNT(artid) FROM ".self::cmTable." WHERE artid = a.id) as totalcomments, YEAR(a.created) as year, MONTH(a.created) as month, DATE_FORMAT(a.created, '%d') as day"
. "\n FROM " . self::mTable . " as a" 
. "\n LEFT JOIN " . self::ctTable . " as c ON c.id = a.cid" 
. "\n LEFT JOIN " . Users::uTable . " as u ON u.id = a.uid" 
. "\n WHERE a.created <= NOW()"
. "\n AND (a.expire = '0000-00-00 00:00:00' OR a.expire >= NOW())"
. "\n AND a.active = 1"
. "\n ORDER BY a.created DESC" . $pager->limit;
    $row = self::$db->fetch_all($sql);

return ($row) ? $row : 0;
}	

以上是关于php Štetjeartiklov - popravek的主要内容,如果未能解决你的问题,请参考以下文章

PHP å...¨è§'ã,'å??Šè§'ã??«ã?™一种,&

PHP curl上ä¼℃〜‡ä»¶å¹¶èŽ·Â¾-E&

PHP å...一个??|å??Šè§'æ-‡A-A ??§A??,A,<A ... <ダ??ã,§

阔叶树

html ŠestajovickáŠestka

sql Nejvyššíčlánkyvkategoriích