Ignore:
Timestamp:
2012/08/30 14:15:56 (12 years ago)
Author:
shutta
Message:

refs #1925 (SC_Queryのupdateメソッドの使用を推奨)
SC_Queryのupdateメソッドを使用するように書き換えた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php

    r21867 r22012  
    528528            $rank = $objQuery->get('rank', 'dtb_category', $where, array($parent_category_id)); 
    529529            // 追加レコードのランク以上のレコードを一つあげる。 
    530             $sqlup = 'UPDATE dtb_category SET rank = (rank + 1) WHERE rank >= ?'; 
    531             $objQuery->exec($sqlup, array($rank)); 
     530            $where = 'rank >= ?'; 
     531            $arrRawSql = array( 
     532                'rank' => '(rank + 1)', 
     533            ); 
     534            $objQuery->update('dtb_category', array(), $where, array($rank), $arrRawSql); 
    532535        } 
    533536 
Note: See TracChangeset for help on using the changeset viewer.