OSDN Git Service

86832aad25bf00e9d9991b44df950f9ccdb70b87
[magic3/magic3.git] / widgets / m / blog_category / include / db / blog_categoryDb.php
1 <?php
2 /**
3  * DBクラス
4  *
5  * PHP versions 5
6  *
7  * LICENSE: This source file is licensed under the terms of the GNU General Public License.
8  *
9  * @package    Magic3 Framework
10  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11  * @copyright  Copyright 2006-2010 Magic3 Project.
12  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
13  * @version    SVN: $Id: blog_categoryDb.php 3833 2010-11-17 01:45:54Z fishbone $
14  * @link       http://www.magic3.org
15  */
16 require_once($gEnvManager->getDbPath() . '/baseDb.php');
17
18 class blog_categoryDb extends BaseDb
19 {
20         /**
21          * ブログカテゴリー一覧を取得
22          *
23          * @param function      $callback                       コールバック関数
24          * @param string        $lang                           言語
25          * @return                      なし
26          */
27         function getAllCategory($callback, $lang)
28         {
29                 $queryStr = 'SELECT * FROM blog_category ';
30                 $queryStr .=  'WHERE bc_language_id = ? ';
31                 $queryStr .=    'AND bc_deleted = false ';              // 削除されていない
32                 $queryStr .=    'AND bc_visible = true ';               // 表示状態
33                 $queryStr .=  'ORDER BY bc_sort_order';
34                 $this->selectLoop($queryStr, array($lang), $callback, null);
35         }
36 }
37 ?>