rkomar Posted January 23, 2011 Share Posted January 23, 2011 Again the developer does not respond to repeated requests for help: I am submitting this code for review if someone has any suggestions this is greatly appreciated. At this time all counts are 0...... <?php //----------------------------------------------------------------------------------------- $SQLcaT = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]' ORDER BY TITLE ASC"; $resultcaT = @mysql_query( $SQLcaT ); $maxcolumns = "3"; $nRecordCounter = 0; while( $rowcaT = @mysql_fetch_array( $resultcaT ) ) { $MyCategoryTitle=EdURL($rowcaT[TITLE]); if($nRecordCounter % $maxcolumns == 0) echo "<tr>"; //------------------------------------------------- ?> <td class="padder5" width="33%" valign="top"><span class="link1"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"> <b> </b></a></span> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <?PHP IF ($rowcaT[CATICON] != $nil) { ?> <a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"><img src="category_icons/<?PHP echo $rowcaT[CATICON]; ?>" border="0"></a><img src="images/transparent.gif" width="10" height="10" /> <?PHP } ?> </td> <td width="100%"><span class="link1"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"><b> <?php echo $rowcaT[TITLE]; ?> </b> </a></span> <?PHP //---------------------------------------------------------------------- if ($rowxxx[COUNT_LISTINGS] == $nil || $rowxxx[COUNT_LISTINGS] == Yes) { $sql_count = "SELECT count(*) FROM LISTINGS WHERE STATUS = 'Active' and CATEGORY = '$rowcaT[iD]'"; $res_count = @mysql_query($sql_count); $row_count = @mysql_fetch_row($res_count); if ($row_count[0] != $nil) echo "<span class=itty_link>($row_count[0])</span>"; } //--------------------------------------------------------------------------- ?> <br> <?PHP //---------------------------------------------------------------------------------------- if ($rowxxx[sLIMIT] == $NIL) $rowxxx[sLIMIT] = 10; $SQLcaTsub = "SELECT * from CATEGORIES WHERE CATEGORY = '$rowcaT[iD]' ORDER BY TITLE ASC LIMIT $rowxxx[sLIMIT]"; $resultcaTsub = @mysql_query( $SQLcaTsub ); $i = 0; while( $rowcaTsub = @mysql_fetch_array( $resultcaTsub ) ) { $i = $i + 1; //--------------------------------------------------------- ?> <span class="subcat_link"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaTsub[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"> <?php echo $rowcaTsub[TITLE]; ?> </a></span> <?php if ($i == $rowxxx[sLIMIT]) echo "..."; else echo ", "; ?> <?PHP } ?> </td> </tr> </table> </td> <?PHP $nRecordCounter++; if($nRecordCounter % $maxcolumns == 0) echo "</tr>"; ?> <?PHP } ?> </table> <?php if ($numrows != '0') { ?><br><?PHP } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.