Hi all,
Having a problem with trapping a null record in a database. I have the following code
<?php do { ?>
<tr>
<td class="itembox"> <?php echo $row_membersdetails['name_f']; ?><a href="intelligence_members_profile_details.php?recordID=<?php echo $row_membersdetails['member_id']; ?>"> </a> </td>
<td class="itembox"><a href="intelligence_members_profile_details.php?recordID=<?php echo $row_membersdetails['member_id']; ?>"><?php echo $row_membersdetails['name_l']; ?></a> </td>
<td class="itembox"><?php echo $row_membersdetails['country']; ?> </td>
<td class="itembox"><?php echo $row_membersdetails['occupation']; ?> </td>
</tr>
<?php } while ($row_membersdetails = mysql_fetch_assoc($membersdetails));
if (strlen ($row_membersdetails['occupation']) == 0)
echo "There is currently no registered menber with the expertise you have selected.";
?>
I think I have the "if (strlen ($row_membersdetails['occupation']) == 0)" in the wrong place,
can anyone help with this.