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


PHP Review::setId方法代碼示例

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


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

示例1: createReview

 private function createReview($row)
 {
     $r = new Review();
     $r->setId($row['id']);
     $r->setReview($row['review']);
     $r->setRestaurantId($row['restaurant_id']);
     $r->setUserId($row['user_id']);
     $r->setUserName($row['firstName'] . " " . $row['lastName']);
     $r->setCreated($row['created_at']);
     return $r;
 }
開發者ID:oripuma,項目名稱:foodo,代碼行數:11,代碼來源:ReviewDb.php

示例2: Review

//заказы
$num = $_POST['num'];
$approve = $_POST['approve'];
$del = $_POST['del'];
//заявки
$numOfState = $_POST['numOfState'];
$approveState = $_POST['approveState'];
$delState = $_POST['delState'];
$answered = true;
if (isset($btnAnswer)) {
    require 'phpmailer/PHPMailerAutoload.php';
    require_once 'classes/Review.php';
    $table = "questions";
    $approveReview = new Review();
    $approveReview->setTable($table);
    $approveReview->setId($shit);
    $approveReview->setAnswer($answer);
    $approveReview->setAnswered($answered);
    $approveReview->approve();
    $mailer = new PHPMailer();
    $mailer->isSMTP();
    $mailer->Host = 'smtp.mail.ru';
    $mailer->SMTPAuth = true;
    $mailer->Username = 'pashebor@mail.ru';
    //Логин
    $mailer->Password = 'ltvmzyjd90';
    //пароль
    $mailer->SMTPSecure = 'ssl';
    $mailer->Port = '465';
    $mailer->CharSet = 'UTF-8';
    $mailer->From = 'pashebor@mail.ru';
開發者ID:Pashebor,項目名稱:wreckthisjournal.github.io,代碼行數:31,代碼來源:controller.php

示例3: getProduct

 public function getProduct($f)
 {
     $id = $f->getId();
     $res = mysql_query("SELECT *,food.id AS fid, seller.id AS sid FROM food INNER JOIN seller ON seller.id=food.seller_id WHERE food.id='" . $id . "'");
     $userRow = mysql_fetch_array($res);
     $food = new Foods();
     $seller = new Seller();
     $review = new Review();
     $food->setId($userRow['fid']);
     $food->setFood($userRow['food']);
     $food->setImgs($userRow['imgs']);
     $food->setPrice($userRow['price']);
     $food->setIngredients($userRow['ingredients']);
     $food->setDescription($userRow['description']);
     $food->setType($userRow['type']);
     $food->setMeal($userRow['meal']);
     $food->setVeg($userRow['veg']);
     $food->setSpicy($userRow['spices']);
     $food->setStock($userRow['stock']);
     $food->setDelivery($userRow['delivery']);
     $food->setDtime($userRow['dtime']);
     $seller->setId($userRow['sid']);
     $seller->setCompany($userRow['company']);
     $seller->setAddress($userRow['address']);
     $seller->setCity($userRow['city']);
     $seller->setPostalcode($userRow['postalcode']);
     $seller->setDescription($userRow['description']);
     $seller->setLogo($userRow['logo']);
     $seller->setUser_id($userRow['user_id']);
     $resR = mysql_query("SELECT * FROM review WHERE food_id='" . $f->getId() . "'");
     $userRowR = mysql_fetch_array($resR);
     $review->setId($userRowR['id']);
     $review->setName($userRowR['name']);
     $review->setEmail($userRowR['email']);
     $review->setComment($userRowR['comment']);
     $review->setRtime($userRowR['rtime']);
     $review->setRday($userRowR['rday']);
     $review->setFood_id($userRowR['food_id']);
     $objs = array();
     $objs[] = $food;
     $objs[] = $seller;
     $objs[] = $review;
     return $objs;
 }
開發者ID:harjotsingh3878,項目名稱:JustBite,代碼行數:44,代碼來源:processitems.php

示例4: Processitems

<?php

include '../include/header.php';
include '../model/processitems.php';
include '../model/food.php';
include '../model/seller.php';
include '../model/review.php';
include '../model/carts.php';
$processitems = new Processitems();
if (isset($_POST['btn-review'])) {
    $review = new Review();
    $review->setName($_POST['rname']);
    $review->setComment($_POST['comment']);
    $review->setEmail($_POST['rmail']);
    $review->setId($_POST['rid']);
    $mydate = getdate(date("U"));
    $rday = $mydate[month] . " " . $mydate[mday] . ", " . $mydate[year];
    $rtime = date(" H:i", time());
    $review->setRday($rday);
    $review->setRtime($rtime);
    $msg = $processitems->addReview($review);
}
if (isset($_GET['id'])) {
    $food = new Foods();
    $food->setId($_GET['id']);
    $objs = $processitems->getProduct($food);
    $f = $objs[0];
    $s = $objs[1];
    $r = $objs[2];
} else {
    if (isset($_POST['id'])) {
開發者ID:harjotsingh3878,項目名稱:JustBite,代碼行數:31,代碼來源:product.php


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