query($sql); $arr = $result->fetchAll(PDO::FETCH_ASSOC); if($arr[0]['ORDER_PAY_STATUS'] == 1){ $sql = "update order_commission set APPLY_TIME = '$time' where ORDER_ID = $v"; $result=$pdo->exec($sql); $sql = "update order_main set ORDER_PAY_STATUS = 0 where ID = $v"; $result=$pdo->exec($sql); } } $code = 0; $info = 'success'; $massge = '成功'; $json['code'] = $code; $json['info'] = $info; $json['massge'] = $massge; echo json_encode($json); ?>