Hi there,
I have a problem with this code. It will terminate the first 'while loop' perfectly, however not the second!!
Here it is:
$query = "SELECT * from company_ins, company_log WHERE company_ins.ins_id = '$typeid'
AND company_log.Id = company_ins.company_Id order by company_log.name";
$result = mysql_query($query, $conn);
//check for any featured providers
while ($row = mysql_fetch_array($result, $conn)) {
if ($row['type_featured'] == "f") {
?>
<div class="linkbox">
FEATURED<a href="<?php echo $row['link']; ?>" class="link" target="_blank"><strong><?php echo $row['name']; ?></strong></a>
<p><?php echo $row['description']; ?><p><a href="<?php echo $row['link']; ?>" target="_blank"><?php echo $row['link']; ?></a></p>
</div>
<?php
}
}
while ($row = mysql_fetch_array($result, $conn)) {
if ($row['type_featured'] !='f') {
?>
<div class="linkbox">
<a href="<?php echo $row['link']; ?>" class="link" target="_blank"><strong><?php echo $row['name']; ?></strong></a>
<p><?php echo $row['description']; ?><p><a href="<?php echo $row['link']; ?>" target="_blank"><?php echo $row['link']; ?></a></p>
</div>
<?php
}
}
?>
Any ideas,
Many thanks!
Will