7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2013 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: contentLibDb.php 5895 2013-04-01 23:57:46Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getDbPath() . '/baseDb.php');
18 class contentLibDb extends BaseDb
23 * @param string $contentType コンテンツタイプ
24 * @param string $contentId コンテンツID
25 * @param string $langId 言語ID
26 * @param array $row レコード
27 * @return bool 取得 = true, 取得なし= false
29 function getContent($contentType, $contentId, $langId, &$row)
31 $queryStr = 'SELECT * FROM content LEFT JOIN _login_user ON cn_create_user_id = lu_id AND lu_deleted = false ';
32 $queryStr .= 'WHERE cn_deleted = false '; // 削除されていない
33 $queryStr .= 'AND cn_type = ? ';
34 $queryStr .= 'AND cn_id = ? ';
35 $queryStr .= 'AND cn_language_id = ? ';
36 $ret = $this->selectRecord($queryStr, array($contentType, $contentId, $langId), $row);
42 * @param string $contentType コンテンツタイプ
43 * @param array $rows レコード
44 * @return bool 1行以上取得 = true, 取得なし= false
46 function getAllConfig($contentType, &$rows)
48 $queryStr = 'SELECT * FROM content_config ';
49 $queryStr .= 'WHERE ng_type = ? ';
50 $queryStr .= 'ORDER BY ng_index';
51 $retValue = $this->selectRecords($queryStr, array($contentType), $rows);