本文整理汇总了PHP中Rating::setDislikeUserId方法的典型用法代码示例。如果您正苦于以下问题:PHP Rating::setDislikeUserId方法的具体用法?PHP Rating::setDislikeUserId怎么用?PHP Rating::setDislikeUserId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rating
的用法示例。
在下文中一共展示了Rating::setDislikeUserId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRating
public function getRating($selectResult)
{
$rating = new Rating();
while ($list = mysqli_fetch_assoc($selectResult)) {
$rating->setId($list['rat_rating_id']);
$rating->setEntityId($list['rat_entity_id']);
$rating->setLikeUserId($list['rat_like_user_id']);
$rating->setDislikeUserId($list['rat_dislike_user_id']);
$rating->setCreatedOn($list['rat_created_on']);
}
//end while
return $rating;
}
示例2: Rating
//add new rating
if ($rating_like_exist == 0 && $rating_dislike_exist == 0) {
if ($is_like == "Y") {
$like_user_id = $user_id;
$dislike_user_id = NULL;
} else {
if ($is_like == "N") {
$dislike_user_id = $user_id;
$like_user_id = NULL;
}
}
//if ($comment_id != "" && $user_id !="") {
$new_rating = new Rating();
$new_rating->setEntityId($entity_id);
$new_rating->setLikeUserId($like_user_id);
$new_rating->setDislikeUserId($dislike_user_id);
$new_rm = new RatingManager();
$new_rating_id = $new_rm->addRating($new_rating);
if ($new_rating_id > 0) {
echo "Adding a new rating succeeded.";
} else {
echo "Adding a new rating failed.";
}
/* } else {
echo "Passing comment id and user id are failed.";
}*/
} else {
if ($rating_like_exist == 1 || $rating_dislike_exist == 1) {
//update a rating
$ratingManager = new RatingManager();
if ($is_like == "Y") {