Forum Moderators: coopster
At the moment, they're being displayed regardless, and the extra space that both images are taking up in dreamweaver makes it that the gap between the entries in the rows are huge.
<?php if ($totalRows_RSResultsClassic > 0)
{ // Show if recordset not empty?>
<img src="images/classic.gif" width="50" height="25">
<?php if ($totalRows_RSResultsNew > 0)
{ // Show if recordset not empty?>
<img src="images/hot.gif" width="50" height="25">
<?php } // Show if recordset not empty?>
<?php } // Show if recordset not empty?>
I've tried different logics ( == 1 <> 0 etc.) but nothing seems to be working.
Any help would be grand!
mysql_select_db($database_concord, $concord);
$query_RSResultsClassic = "SELECT * FROM films WHERE Classic = '1'";
$RSResultsClassic = mysql_query($query_RSResultsClassic, $concord) or die(mysql_error());
$row_RSResultsClassic = mysql_fetch_assoc($RSResultsClassic);
$totalRows_RSResultsClassic = mysql_num_rows($RSResultsClassic);
mysql_select_db($database_concord, $concord);
$query_RSResultsNew = "SELECT * FROM films WHERE NewReleases = '1'";
$RSResultsNew = mysql_query($query_RSResultsNew, $concord) or die(mysql_error());
$row_RSResultsNew = mysql_fetch_assoc($RSResultsNew);
$totalRows_RSResultsNew = mysql_num_rows($RSResultsNew);
try something like
<?php if($row_RSResultsClassic["classic"]==1){?>
<img src="images/classic.gif" width="50" height="25">
<?php }?>
This will check whether the row has a value of 1, not whether the query has returned any rows.
Ally
The problem looks to be that you are checking for "classic" but should really be checking for "Classic"
Ally