本文整理汇总了PHP中Quiz::quizRecommendation方法的典型用法代码示例。如果您正苦于以下问题:PHP Quiz::quizRecommendation方法的具体用法?PHP Quiz::quizRecommendation怎么用?PHP Quiz::quizRecommendation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quiz
的用法示例。
在下文中一共展示了Quiz::quizRecommendation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
}
// end of if
//if function needs to be done is recommedation
//update all the recommendation into database: tranverse through checkbox group
if (isset($_GET['do']) && $_GET['do'] == "delete") {
$array_delete = $_POST['checkbox_delete'];
if (empty($array_delete)) {
echo "You didn't select any quiz for deleting.";
} else {
$delNum = count($array_delete);
echo "{$delNum} quizzes have been deleted from recommendation list.";
for ($i = 0; $i < $delNum; $i++) {
// update database: call the method from quiz.php
$quiz_id = $array_delete[$i] . " ";
$quiz = new Quiz($quiz_id);
$quiz->quizRecommendation($quiz_id, 0);
}
}
}
// end of if
// retrieve recommended quizzes
$query_recommendations = sprintf("SELECT quiz_id, quiz_name, quiz_description, quiz_picture, fk_quiz_cat, member_name, fk_member_id, cat_name, likes, dislikes FROM q_quizzes, q_quiz_cat, s_members WHERE member_id = fk_member_id AND cat_id = fk_quiz_cat AND isRecommended = 1 LIMIT 0, %d", 15);
$recommendations = mysql_query($query_recommendations, $quizroo) or die(mysql_error());
$row_recommendations = mysql_fetch_assoc($recommendations);
$totalRows_recommendations = mysql_num_rows($recommendations);
?>
</div>
<!-- Display the current recommendations -->
<div class="framePanel rounded">
<h2>Recommended quizzes</h2>
<div class="content-container">