Changeset 18488


Ignore:
Timestamp:
2010/01/10 11:02:48 (12 years ago)
Author:
Seasoft
Message:

抽出条件のユニークが保障されない不具合を解決。プライマリキー列をキーとして利用するように改善。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php

    r18234 r18488  
    119119        // 出力項目の取得 
    120120        $arrOutput = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput($subno_csv, "WHERE csv_id = ? AND status = 1", array($subno_id))); 
    121         $arrOutput = SC_Utils_Ex::sfarrCombine($arrOutput['col'], $arrOutput['disp_name']); 
     121        $arrOutput = SC_Utils_Ex::sfarrCombine($arrOutput['no'], $arrOutput['disp_name']); 
    122122 
    123123        // 非出力項目の取得 
    124124        $arrChoice = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput($subno_csv, "WHERE csv_id = ? AND status = 2", array($subno_id))); 
    125125 
    126         if (!isset($arrChoice['col'])) $arrChoice['col'] = array(); 
     126        if (!isset($arrChoice['no'])) $arrChoice['no'] = array(); 
    127127        if (!isset($arrChoice['disp_name'])) $arrChoice['disp_name'] = array(); 
    128128 
    129         $arrChoice = SC_Utils_Ex::sfarrCombine($arrChoice['col'], $arrChoice['disp_name']); 
     129        $arrChoice = SC_Utils_Ex::sfarrCombine($arrChoice['no'], $arrChoice['disp_name']); 
    130130 
    131131        $this->arrOutput=$arrOutput; 
     
    160160        if (is_array($arrData)) { 
    161161            foreach($arrData as $key => $val){ 
    162                 $upd_sql = "UPDATE dtb_csv SET status = 1, rank = ? WHERE csv_id = ? AND col = ? "; 
    163                 $objQuery->query($upd_sql, array($key+1, $csv_id,$val)); 
     162                $upd_sql = "UPDATE dtb_csv SET status = 1, rank = ? WHERE csv_id = ? AND no = ? "; 
     163                $objQuery->query($upd_sql, array($key+1, $csv_id, $val)); 
    164164            } 
    165165        } 
Note: See TracChangeset for help on using the changeset viewer.