当前位置: 首页>>代码示例>>PHP>>正文


PHP Review::setTravelDate方法代码示例

本文整理汇总了PHP中Review::setTravelDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Review::setTravelDate方法的具体用法?PHP Review::setTravelDate怎么用?PHP Review::setTravelDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Review的用法示例。


在下文中一共展示了Review::setTravelDate方法的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

                    $_SESSION['action'] = "readReview";
                    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,代码行数:31,代码来源:WriteReviews.php


注:本文中的Review::setTravelDate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。