Changeset 19730
- Timestamp:
- 2010/12/16 23:18:05 (13 years ago)
- Location:
- branches/version-2_5-dev
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Product.php
r19711 r19730 586 586 $objQuery =& SC_Query::getSingletonInstance(); 587 587 $objQuery->groupby = 'GROUP BY payment_id HAVING COUNT(payment_id) = ?'; 588 $paymentIds = $objQuery->getCol(' dtb_payment_options', 'payment_id',588 $paymentIds = $objQuery->getCol('payment_id', 'dtb_payment_options', 589 589 'product_class_id IN (' . implode(', ', array_pad(array(), $size, '?')) . ')', 590 590 array_merge($productClassIds, array($size)), -
branches/version-2_5-dev/data/class/SC_Query.php
r19729 r19730 609 609 * @return array SQL の実行結果の配列 610 610 */ 611 function getCol($ table, $col, $where = "", $arrval = array()) {611 function getCol($col, $table, $where = "", $arrval = array()) { 612 612 $sql = $this->getSql($col, $table, $where); 613 613 $sql = $this->dbFactory->sfChangeMySQL($sql); -
branches/version-2_5-dev/data/class/helper/SC_Helper_CSV.php
r19670 r19730 170 170 // カテゴリID 171 171 if (in_array('category_id', $arrOutputCols)) { 172 $row['category_id'] = $objQuery->getCol("dtb_product_categories", 173 "category_id", 174 "product_id = ?", 175 array($row['product_id'])); 172 $row['category_id'] = $objQuery->getCol( 173 "category_id", 174 "dtb_product_categories", 175 "product_id = ?", 176 array($row['product_id']) 177 ); 176 178 } 177 179 -
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r19729 r19730 799 799 $objQuery =& SC_Query::getSingletonInstance(); 800 800 $where = "product_id = ?"; 801 $category_id = $objQuery->getCol(" dtb_product_categories", "category_id", "product_id = ?", array($product_id));801 $category_id = $objQuery->getCol("category_id", "dtb_product_categories", "product_id = ?", array($product_id)); 802 802 $this->g_category_id = $category_id; 803 803 } else { … … 1723 1723 $objQuery =& SC_Query::getSingletonInstance(); 1724 1724 $where = "product_id = ?"; 1725 $maker_id = $objQuery->getCol(" dtb_products", "maker_id", "product_id = ?", array($product_id));1725 $maker_id = $objQuery->getCol("maker_id", "dtb_products", "product_id = ?", array($product_id)); 1726 1726 $this->g_maker_id = $maker_id; 1727 1727 } else { -
branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
r19728 r19730 388 388 389 389 // カテゴリID を取得 390 $arrRet[0]['category_id'] = $objQuery->getCol("dtb_product_categories", 391 "category_id", 392 "product_id = ?", 393 array($product_id)); 390 $arrRet[0]['category_id'] = $objQuery->getCol( 391 "category_id", 392 "dtb_product_categories", 393 "product_id = ?", 394 array($product_id) 395 ); 394 396 //編集時に規格IDが変わってしまうのを防ぐために規格が登録されていなければ規格IDを取得する 395 397 if (!$objDb->sfHasProductClass($_POST['product_id'])) { -
branches/version-2_5-dev/data/include/module.inc
r18820 r19730 58 58 59 59 $_objQuery = new SC_Query; 60 $_arrModuleCode = $_objQuery->getCol(' dtb_module', 'module_code');60 $_arrModuleCode = $_objQuery->getCol('module_code', 'dtb_module'); 61 61 62 62 if (is_array($_arrModuleCode)) { -
branches/version-2_5-dev/test/class/SC_Query_Test.php
r18820 r19730 154 154 155 155 $this->expected = array(1, 2); 156 $this->actual = $this->objQuery->getCol(" test_table", "column1","id < ?", array(3));156 $this->actual = $this->objQuery->getCol("column1", "test_table", "id < ?", array(3)); 157 157 158 158 $this->verify();
Note: See TracChangeset
for help on using the changeset viewer.