Show Photo if column = "_wp_attached_file" returns a 500 error
Show Photo if column = "_wp_attached_file" returns HTTP ERROR 500
I thought I remembered being able to do this. It keeps failing.
Any help would be appreciated.
Thanks
Jack
<?php
$wa_repeatfor = 6; // Repeat Selection 3
if (!isset($wa_repeatcount)) $wa_repeatcount = 0;
while (!$rsWordpressNews->atEnd() && $wa_repeatfor != 0) {
$wa_repeatfor--;
$wa_repeatcount++;
if (!$rsWordpressNews->atEnd()) {
?>
<div class="col-12 col-md-6 col-lg-6 ">
<div class="card mb-2" >
<div class="shadowBox " style="max-height:245px; overflow: hidden">
<!--SHOW PHOTO IF = _wp_attached_file-->
<?php if ($rsWordpressNews->getColumnVal("meta_key") = "_wp_attached_file") { // Show if mysqli recordset not empty ?>
<a href="news.php?ID=<?php echo($rsWordpressNews->getColumnVal("post_id")); ?>"><img src="../wp-content/uploads/<?php echo(html_entity_decode($rsWordpressNews->getColumnVal("meta_value"))); ?>" class="img-fluid w-100" border="0"></a>
<?php } // Show if mysqli recordset not empty ?>
</div>
<div class="mt-3 " style="overflow: hidden; text-overflow: ellipsis;">
<h2 class="newsHead"><?php echo(html_entity_decode($rsWordpressNews->getColumnVal("post_title"))); ?></h2>
<p class="newsPreview">
<?php $input = (strip_tags((html_entity_decode($rsWordpressNews->getColumnVal("post_content"))))) ; echo wordCutString($input, 0, 40 ); ?>
... <span class="newsReadMore noIndent"><a href="news.php?ID=<?php echo($rsWordpressNews->getColumnVal("ID")); ?>">Read More</a></span></p>
</div>
</div>
</div>
<?php
if ($wa_repeatfor != 0) $rsWordpressNews->moveNext(); // Repeat Alternate 3
} else {
?>
<?php
} // End Repeat Alternate 3
?>
<?php
}
if (!isset($wa_startindex)) $rsWordpressNews->moveFirst(); // End Repeat Selection 3
?>