diff --git a/module/ci/control.php b/module/ci/control.php index d06c715240..e38d453fc4 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -123,7 +123,10 @@ class ci extends control $caseResult = $post->funcResult; $firstCase = array_shift($caseResult); $productID = $firstCase->productId; - if(empty($productID) and !empty($firstCase->id)) $productID = $this->dao->select('product')->from(TABLE_CASE)->where('id')->eq((int)$firstCase->id)->fetch('product'); + if(empty($productID) and !empty($firstCase->id)) + { + $productID = $this->dao->findById($firstCase->id)->from(TABLE_CASE)->fetch('product'); + } } if(empty($productID)) die(json_encode(array('result' => 'fail', 'message' => 'productID is not found')));