$where = ""; if(isset($_GET["v_id"])){ $where = " and id=".$_GET["v_id"]; }else{ $where=""; } $video_select = "SELECT *,(SELECT count(*) FROM ".MYSQL_DB.".videos_comments as b WHERE b.video_id=a.id) as t_comment FROM ".MYSQL_DB. ".videos as a WHERE approved='1' $where ORDER BY id desc,postdate DESC limit 0,1"; $video_show = conToLocal($video_select,1); $r = @mysql_fetch_assoc($video_show); $video_title = stripcslashes($r["title"]); $video_description = outputString($r["description"]); $video_viewtimes = $r["view_times"]; $video_ratetimes = $r["ratetimes"]; $video_comment = $r["t_comment"]; $video_image = $r["image"]; $video_file = $r["file"]; $video_id = $r["id"]; $previous_video_id = $video_id; $video_poster = $r["poster"]; $video_logo = $r["logo"]; if(@mysql_num_rows($video_show)>0){ ?>