- Timestamp:
- 2012/02/28 22:35:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
r21544 r21563 104 104 * $add == false で, データが存在しない場合 false 105 105 */ 106 function sfDataExists($table_name, $where, $arr val, $dsn = '', $sql = '', $add = false) {106 function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false) { 107 107 $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 108 108 $dsn = $dbFactory->getDSN($dsn); 109 109 110 110 $objQuery =& SC_Query_Ex::getSingletonInstance(); 111 $exists = $objQuery->exists($table_name, $where, $arr val);111 $exists = $objQuery->exists($table_name, $where, $arrWhereVal); 112 112 113 113 // データを追加する … … 771 771 $from = $objProduct->alldtlSQL($where_products_class); 772 772 foreach ($arrTgtCategory_id as $category_id) { 773 $arr val = array();774 list($tmp_where, $ tmp_arrval) = $this->sfGetCatWhere($category_id);773 $arrWhereVal = array(); 774 list($tmp_where, $arrTmpVal) = $this->sfGetCatWhere($category_id); 775 775 if ($tmp_where != '') { 776 776 $sql_where_product_ids = 'product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')'; 777 $arr val = $tmp_arrval;777 $arrWhereVal = $arrTmpVal; 778 778 } else { 779 779 $sql_where_product_ids = '0<>0'; // 一致させない … … 781 781 $where = "($sql_where) AND ($sql_where_product_ids)"; 782 782 783 $arrUpdateData[$category_id] = $objQuery->count($from, $where, $arr val);783 $arrUpdateData[$category_id] = $objQuery->count($from, $where, $arrWhereVal); 784 784 } 785 785 … … 933 933 * @param string $valname データ内容のカラム名 934 934 * @param string $where WHERE句 935 * @param array $arr val プレースホルダ935 * @param array $arrWhereVal プレースホルダ 936 936 * @return array SELECT ボックス用リストの配列 937 937 */ … … 1230 1230 * @param string $table テーブル名 1231 1231 * @param string $col カラム名 1232 * @param array $arr val 要素の配列1232 * @param array $arrVal 要素の配列 1233 1233 * @param array $addwhere SQL の AND 条件である WHERE 句 1234 1234 * @return bool レコードが存在する場合 true 1235 1235 */ 1236 function sfIsRecord($table, $col, $arr val, $addwhere = '') {1236 function sfIsRecord($table, $col, $arrVal, $addwhere = '') { 1237 1237 $objQuery =& SC_Query_Ex::getSingletonInstance(); 1238 1238 $arrCol = preg_split('/[, ]/', $col); … … 1253 1253 } 1254 1254 } 1255 $ret = $objQuery->get($col, $table, $where, $arr val);1255 $ret = $objQuery->get($col, $table, $where, $arrVal); 1256 1256 1257 1257 if ($ret != '') {
Note: See TracChangeset
for help on using the changeset viewer.