Forum Moderators: coopster
if(mysql_num_rows($result) < 0)
{
echo "no results to show";
exit;
}
else{
//build the table
}
[edited by: Matthew1980 at 4:39 pm (utc) on Mar 8, 2010]
<tr>
<td><?php echo(isset($totalRows_rsRecRes) && ($totalRows_rsRecRes < 0) ? 'nothing in the db': '<span class="style2">Artist</span>'); ?></td>
</tr>
<tr>
<td><span class="style8">
<?php echo (isset($totalRows_rsRecRes) && ($totalRows_rsRecRes < 0) ? 'No data in the database' : $row_rsRecordings['recordingartistName'] ); ?>
</span></td>
</tr>
<tr <?php if($totalRows_rsRecRes > 0){ print "style='display:none;'";} ?>
<td><span class="style2">Artist</span></td>
</tr>
<tr>
<td><span class="style8">
<?php if ($totalRows_rsRecRes > 0) { // Show if recordset not empty ?>
<?php echo $row_rsRecordings['recordingartistName']; ?>
<?php } // Show if recordset not empty ?></span></td>
</tr>