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


PHP Quiz::quizRecommendation方法代码示例

本文整理汇总了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">
开发者ID:Jessicasoon,项目名称:ProjectKentRidgeV2,代码行数:31,代码来源:recommendationList.php


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