首页 > 解决方案 > 先显示当前视频ID图像

问题描述

我想首先显示当前正在播放的视频图像,其他视频图像必须在第一张图像之后显示我已经根据视频上传的 id 顺序编写了它在图像中显示的代码,请帮助如何解决这个问题。

这是我的代码

 /* this is selecting the videos category according to the current ID */
    $sql01="SELECT `video_category` as VidCate FROM `uploaded_videos` WHERE `uv_id`='$uvId'";
            $my01=$connection->selector($sql01);
            $row01=mysqli_fetch_assoc($my01);
            extract($row01);

/* according to the category fetching the all videos and display the thumbnail */
            $sql = "SELECT `uv_id`,uv.`es_id`, `video_code`, `uv_title`, `uv_description`, `campus_id`, `faculty_id`,
                         `video_category`, `video_path`, `thum_image`,`es_full_name`,`es_index_number`
                  FROM `uploaded_videos` as uv, `existing_students` as es 
                  WHERE uv.`es_id`=es.`es_index_number` AND `video_category`='$VidCate'";
            $my = $connection->selector($sql);
            while ($row = mysqli_fetch_assoc($my))
            {
                extract($row);

                if($uv_id==$uvId)
                {
                    $str .="<div class=\"item\">
                            <div class=\"dlab-box\">
                                <div class=\"dlab-media set-img-item-box\" style='height: 200px!important;'>
                                    <a href=\"video_detail.php?videoLink=$uvId\"><img src=\"$thum_image\" alt=\"$uv_title\" class='set-img-item-box-recently-uploaded'></a>
                                </div>
                                <div class=\"dlab-info border-0\">
                                    <ul class=\"blog-info text-white play-active\">
                                        <li><a href=\"video_detail.php?videoLink=$uvId\" title=\"$uv_title\" rel=\"author\" class=\"text-white\">NOW PLAYING</a> </li>
                                    </ul>
                                </div>
                            </div>
                        </div>";
                }else{
                    //echo "123456";
                    $str .="<div class=\"item\">
                                <div class=\"dlab-box\">
                                    <div class=\"dlab-media set-img-item-box\" style='height: 200px!important;'>
                                        <a href=\"video_detail.php?videoLink=$uv_id\"><img src=\"$thum_image\" alt=\"$uv_title\"></a>
                                    </div>
                                    <div class=\"dlab-info border-0\">
                                        <ul class=\"blog-info text-white\">
                                            <li>By <a href=\"video_detail.php?videoLink=$uv_id\" title=\"$uv_title\" rel=\"author\" class=\"text-white\">$es_full_name</a> </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>";
                }

            }

            return $str;

        }

标签: phpmysql

解决方案


推荐阅读