close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Show Photo if column = "_wp_attached_file" returns a 500 error

Thread began 5/03/2022 7:04 am by cal114936 | Last modified 5/04/2022 9:23 am by cal114936 | 130 views | 2 replies

cal114936Beta Tester

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
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...