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


PHP Review::setRday方法代码示例

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


在下文中一共展示了Review::setRday方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: Processitems

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'])) {
        $c = new Cart();
        $c->setFood_id(mysql_real_escape_string($_POST['id']));
        $c->setQuantity(mysql_real_escape_string($_POST['quantity']));
开发者ID:harjotsingh3878,项目名称:JustBite,代码行数:31,代码来源:product.php


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