Could anyone help with this please?
I am pulling the results in below from the cms_page_part table. I know for a fact there should be two rows. One where "name" is equal to "body" and the other that exists is "testionial" however my query below only prints the first one. Is it because im fetching the results incorrectly?
<div class="feature-text">
<?php
$qpp = mysql_query("SELECT * FROM cms_page_part WHERE page_id=$id");
$rpp = $qpp->fetch(PDO::FETCH_BOTH);
foreach ($rpp as $row) {
?>
<div id="col1">
<p><?php echo $row['name']=='body' ? $row['content_html'] : NULL; ?></p>
</div>
<div id="col2">
<p class="testimonial"><?php echo $row['name']=='sidebar' ? $row['content_html'] : NULL; ?></p>
</div>
<?php
}
?>
</div>