ソースを参照

modify attribute.php

root 9 年 前
コミット
9323baa475
1 ファイル変更2 行追加2 行削除
  1. 2 2
      mobile/control/attribute.php

+ 2 - 2
mobile/control/attribute.php

@@ -30,13 +30,13 @@ class attributeControl extends mobileHomeControl
         $result = array();
         foreach ($attr_list as $value) {
 
-            $type = Model()->table('type')->find($value['type_id']);
+            $type = Model()->table('type')->where(array('type_id' => $value['type_id']))->limit(1)->select();
             if (!empty($type)) {
 
                 $fields = "attr_value_id,attr_value_name,attr_id,type_id";
                 $attr_value_list = Model()->table('attribute_value')->field($fields)->where(array('attr_id' => $value['attr_id']))->select();
 
-                $attr['type_name'] = $type['type_name'];
+                $attr['type_name'] = $type[0]['type_name'];
                 $attr['data'] = $attr_value_list;
                 array_push($result, $attr);
             }