本文整理汇总了PHP中Review::setFlightDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP Review::setFlightDescription方法的具体用法?PHP Review::setFlightDescription怎么用?PHP Review::setFlightDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Review
的用法示例。
在下文中一共展示了Review::setFlightDescription方法的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;
}
示例2: header
} else {
if (array_key_exists('flagForEditProfile', $_REQUEST) && $_REQUEST['flagForEditProfile']) {
$_SESSION['action'] = "displayUser";
header("Location: ../controller/Controller.php");
} else {
if (array_key_exists('flagForSearch', $_REQUEST) && $_REQUEST['flagForSearch']) {
$_SESSION['action'] = "searchFlights";
header("Location: ../controller/Controller.php");
} else {
if (array_key_exists('flagForWriteReview', $_REQUEST) && $_REQUEST['flagForWriteReview']) {
$_SESSION['action'] = "writeReview";
header("Location: ../controller/Controller.php");
} else {
if (isset($_POST['Search'])) {
$review = new Review();
$review->setFlightDescription($_REQUEST['flightDescription']);
$_SESSION['review'] = serialize($review);
$_SESSION['action'] = 'displayReview';
header("Location: ../controller/Controller.php");
}
?>
<form action="" theme="simple" method="POST" name="readReviewsForm">
<input type="hidden" name ="flagForHome" id="flagForHome"/>
<input type="hidden" name ="flagForLogOut" id="flagForLogOut"/>
<input type="hidden" name ="flagForSearch" id="flagForSearch"/>
<input type="hidden" name ="flagForEditProfile" id="flagForEditProfile"/>
<input type="hidden" name="flagForWriteReview" id="flagForWriteReview"/>
<table class="tableborder1" align="center">
<tr>