How do I make my query return only records that are filled in? My table has some blank records that are returned by the association.
<?php
$consulta = $pdo->query("SELECT * FROM ws_so_wind, ws_soft_gallery WHERE id_soft = id_img AND id_soft = $id_soft ");
foreach ($consulta as $foto) {
?>
<a href="<?= BASEIMG ?><?= $foto['url_gallery']; ?> " data-lightbox="set" data-title="">
<img itemprop="screenshot" class="screenshot" src="<?= BASEIMG ?><?= $foto['url_gallery']; ?> "></a>
<?php } ?>