當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Review::setReviewDescription方法代碼示例

本文整理匯總了PHP中Review::setReviewDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP Review::setReviewDescription方法的具體用法?PHP Review::setReviewDescription怎麽用?PHP Review::setReviewDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Review的用法示例。


在下文中一共展示了Review::setReviewDescription方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getReview

 function getReview($flightDesc)
 {
     ini_set('display_errors', 'On');
     $db = "w4111c.cs.columbia.edu:1521/adb";
     $conn = oci_connect("kpg2108", "test123", $db);
     $stmt = oci_parse($conn, "Select u.fname,f.flight_desc,r.travel_date,r.description from review r join flight f on R.FLIGHT_ID = F.FLIGHT_ID join users u on R.USER_ID = u.user_id where F.FLIGHT_DESC = '" . $flightDesc . "'");
     oci_define_by_name($stmt, 'NUM_ROWS', $this->num_rows);
     oci_execute($stmt);
     oci_close($conn);
     $arrayOfReviewDetails = array();
     while ($row = oci_fetch_row($stmt)) {
         $review = new Review();
         $review->setFlightName($row[0]);
         $review->setFlightDescription($row[1]);
         $review->setTravelDate($row[2]);
         $review->setReviewDescription($row[3]);
         array_push($arrayOfReviewDetails, $review);
     }
     return $arrayOfReviewDetails;
 }
開發者ID:NLP-Project,項目名稱:AirLine-Reservation-System,代碼行數:20,代碼來源:ReviewModel.php

示例2: header

                    header("Location: ../controller/Controller.php");
                }
            }
        }
    }
}
$show_form = true;
if (isset($_POST['Write'])) {
    $validator = new FormValidator();
    $validator->addValidation("journeyDate", "req", "Please select a journey date");
    $validator->addValidation("reviewDescription", "req", "Please enter a review description");
    if ($validator->ValidateForm()) {
        $review = new Review();
        $review->setFlightId($_REQUEST['flightId']);
        $review->setTravelDate($_REQUEST['journeyDate']);
        $review->setReviewDescription($_REQUEST['reviewDescription']);
        $_SESSION['review'] = serialize($review);
        $_SESSION['action'] = "insertReview";
        header("Location: ../controller/Controller.php");
    } else {
        echo "<B>Validation Errors:</B>";
        $error_hash = $validator->GetErrors();
        foreach ($error_hash as $inpname => $inp_err) {
            echo "<p>{$inpname} : {$inp_err}</p>\n";
        }
    }
}
$disp_journeyDate = isset($_POST['journeyDate']) ? $_POST['journeyDate'] : '';
$disp_reviewDescription = isset($_POST['reviewDescription']) ? $_POST['reviewDescription'] : '';
?>
開發者ID:NLP-Project,項目名稱:AirLine-Reservation-System,代碼行數:30,代碼來源:WriteReviews.php


注:本文中的Review::setReviewDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。