Changeset 17522


Ignore:
Timestamp:
2008/08/11 23:28:34 (13 years ago)
Author:
Seasoft
Message:

stock_unlimited に NULL が代入され、stock_unlimited_min 及び stock_unlimited_max が不当な値になるのを回避。また、予防処置としてテーブル定義に NOT NULL 制約を追加。

Location:
branches/comu-ver2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php

    r17509 r17522  
    358358                $sqlval['product_code'] = $arrList["product_code:".$cnt]; 
    359359                $sqlval['stock'] = $arrList["stock:".$cnt]; 
    360                 $sqlval['stock_unlimited'] = $arrList["stock_unlimited:".$cnt]; 
     360                $sqlval['stock_unlimited'] = ($arrList["stock_unlimited:".$cnt]) ? '1' : '0'; 
    361361                $sqlval['price01'] = $arrList['price01:'.$cnt]; 
    362362                $sqlval['price02'] = $arrList['price02:'.$cnt]; 
  • branches/comu-ver2/data/class/util/SC_Utils.php

    r17509 r17522  
    775775            $sqlval['product_code'] = $arrList["product_code"]; 
    776776            $sqlval['stock'] = $arrList["stock"]; 
    777             $sqlval['stock_unlimited'] = $arrList["stock_unlimited"]; 
     777            $sqlval['stock_unlimited'] = ($arrList["stock_unlimited"]) ? '1' : '0'; 
    778778            $sqlval['price01'] = $arrList['price01']; 
    779779            $sqlval['price02'] = $arrList['price02']; 
  • branches/comu-ver2/html/install/sql/create_table_mysql.sql

    r17490 r17522  
    337337    product_code text, 
    338338    stock numeric, 
    339     stock_unlimited smallint DEFAULT 0, 
     339    stock_unlimited smallint NOT NULL DEFAULT 0, 
    340340    sale_limit numeric, 
    341341    price01 numeric, 
  • branches/comu-ver2/html/install/sql/create_table_pgsql.sql

    r17490 r17522  
    347347    product_code text, 
    348348    stock numeric, 
    349     stock_unlimited int2 DEFAULT 0, 
     349    stock_unlimited int2 NOT NULL DEFAULT 0, 
    350350    sale_limit numeric, 
    351351    price01 numeric, 
Note: See TracChangeset for help on using the changeset viewer.