Display an image if value "7" is in row "Codes"

0

Thank you for the help you will offer me. I have tried many things, but now I am not advancing at all. I was able to put this code but it does not show me any image.

There on top in my

 $results = $query->fetchAll( PDO::FETCH_ASSOC );

And there in the table it looks like this:

  <?php foreach( $results as $row ){
    if($row['Codigos'] == 7 && $row['Maquinas'] == 5) {
 echo '<img src="/images/'.$photo->t1.png.'"/>';
    }
    ?>

In short ... I will have a table with several possibilities, there will be 3 columns in the table and the images will change every X minutes and if the value changes in the database, then it will change the image inside the table too. >

Thank you all again!

    
asked by anonymous 23.11.2017 / 13:19

0 answers