I have researched here and google to see if it would solve my problem without having to ask a question, but I could not find any solution.
What I'm trying to do is create a "related" but without it displaying the same post or video in case. In case I am using the following code:
<?php
if(!@mysql_connect("localhost","root",""))
{
die('oops connection problem ! --> '.mysql_error());
}
if(!mysql_select_db("player"))
{
die('oops database selection problem ! --> '.mysql_error());
}
$query = @mysql_query("SELECT * FROM videopv2 WHERE 'videopv2'.'tipo_relacao'= '$tipode' ORDER BY id DESC");
while ($relacionados = @mysql_fetch_object($query)):
?>
<article class="video-preview <?php echo $relacionados->categoria_video; ?>" data-viewkey="6b684234a3" itemscope="itemscope" itemtype="http://schema.org/ImageObject">
<a title="<?php echo $relacionados->titulo_video; ?>" itemprop="url" target="_blank" href="/AP/embed/<?php echo $relacionados->id; ?>">
<img class="media-preview-thumbnail js-resrc js-resrc-lazy" alt="<?php echo $relacionados->titulo_video ?>" itemprop="thumbnailUrl" src="/AP/assets/embed/imgs/<?php echo $relacionados->imagem_video; ?>" data-src="/AP/assets/embed/imgs/<?php echo $relacionados->imagem_video; ?>" />
<h4 class="media-preview-title" itemprop="name"><?php echo $relacionados->titulo_video; ?></h4>
</a>
</article>
<?php endwhile; ?>