OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / widgets / ec_cart / include / db / ec_cart_boxDb.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-2012 Magic3 Project.
12  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
13  * @version    SVN: $Id: ec_cart_boxDb.php 5416 2012-11-30 00:50:30Z fishbone $
14  * @link       http://www.magic3.org
15  */
16 require_once($gEnvManager->getDbPath() . '/baseDb.php');
17
18 class ec_cart_boxDb extends BaseDb
19 {
20         /**
21          * 商品を商品ID、言語IDで取得
22          *
23          * @param int           $id                                     商品ID
24          * @param string        $langId                         言語ID
25          * @param array     $row                                レコード
26          * @return bool                                                 取得 = true, 取得なし= false
27          */
28         function getImageInfoByProductId($id, $langId, &$row)
29         {
30                 $queryStr  = 'SELECT * FROM product_image ';
31                 $queryStr .=   'WHERE im_deleted = false ';// 削除されていない
32                 $queryStr .=     'AND im_type = 2 ';            // 商品画像
33                 $queryStr .=     'AND im_id = ? ';
34                 $queryStr .=     'AND im_language_id = ? ';
35                 $ret = $this->selectRecords($queryStr, array($id, $langId), $row);
36                 return $ret;
37         }
38         /**
39          * 画像情報を取得
40          *
41          * @param string        $type                   画像タイプ
42          * @param array     $row                                レコード
43          * @return bool                                                 取得 = true, 取得なし= false
44          */
45         function getProductImageInfo($type, &$row)
46         {
47                 $queryStr  = 'SELECT * FROM image_size ';
48                 $queryStr .=   'WHERE is_id = ? ';
49                 $ret = $this->selectRecord($queryStr, array($type), $row);
50                 return $ret;
51         }
52 }
53 ?>