當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Articles::select方法代碼示例

本文整理匯總了PHP中Articles::select方法的典型用法代碼示例。如果您正苦於以下問題:PHP Articles::select方法的具體用法?PHP Articles::select怎麽用?PHP Articles::select使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Articles的用法示例。


在下文中一共展示了Articles::select方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findArticles

 function findArticles($select = null)
 {
     $t = new Articles();
     if (is_string($select)) {
         $select = $t->select()->where($select);
     }
     $select->setIntegrityCheck(false)->from('article')->where('article.journal = ?', $this->id);
     return $t->fetchAll($select);
 }
開發者ID:bersace,項目名稱:strass,代碼行數:9,代碼來源:Journaux.php

示例2: actionModify

 /**
  * 添加、修改文章
  */
 public function actionModify($id)
 {
     $id = (int) $id;
     $where = array('a.aid' => $id);
     $Articles = new Articles();
     $Category = new Category();
     $this->data = $Articles->select('c.*,a.*')->from('articles a')->join('articles_content c', 'a.aid=c.aid')->where($where)->getOne();
     $this->data['content'] = stripslashes($this->data['content']);
     $this->category = $Category->getAll();
 }
開發者ID:mamtou,項目名稱:wavephp,代碼行數:13,代碼來源:ArticlesController.php

示例3: actionArticle

 /**
  * 文章詳情
  */
 public function actionArticle($aid)
 {
     $aid = (int) $aid;
     $Articles = new Articles();
     $Category = new Category();
     $where = array('a.aid' => $aid);
     $this->data = $Articles->select('c.*,a.*')->from('articles a')->join('articles_content c', 'a.aid=c.aid')->where($where)->getOne();
     $this->data['content'] = stripslashes($this->data['content']);
     $this->title = $this->data['title'];
     $this->category = $Category->getOne('*', array('cid' => $this->data['cid']));
     $this->cid = $this->data['cid'];
 }
開發者ID:xpmozong,項目名稱:wavephp2_demos,代碼行數:15,代碼來源:NewsController.php

示例4: findArticles

 function findArticles()
 {
     $t = new Articles();
     $s = $t->select()->setIntegrityCheck(false)->distinct()->from('article')->join('commentaire', 'commentaire.id = article.commentaires', array())->where('commentaire.auteur = ?', intval($this->id));
     return $t->fetchAll($s);
 }
開發者ID:bersace,項目名稱:strass,代碼行數:6,代碼來源:Individus.php

示例5: actionIndex

 /**
  * 默認函數
  */
 public function actionIndex()
 {
     $Articles = new Articles();
     $this->list = $Articles->select('a.aid,a.title,a.add_date,c.c_name')->from('articles a')->join('category c', 'a.cid=c.cid')->limit(0, 12)->order('a.aid', 'desc')->getAll();
 }
開發者ID:mamtou,項目名稱:wavephp,代碼行數:8,代碼來源:SiteController.php


注:本文中的Articles::select方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。