Jump to content

repeat region help


mike760534211

Recommended Posts

I have a standard repeat region that lists all records in a db. code follows:

<?php do { ?>
  <table width="100%" height="401" cellpadding="5" bordercolor="#2f291b">
    <tbody><tr>
      <td class="style2 style9" align="left" bgcolor="#2f291b" height="30" valign="top" width="46%"><table border="0" cellpadding="0" width="100%">
        <tbody><tr>
          <td class="style34"><?php echo $row_Recordset1['horsename']; ?></td>
          <td class="style35" align="right"><strong>
            <?php if ($price == "") { 
			echo ""; } else { 
		echo $price ;} ?><br><?php
				if ($auction == "") {
					echo "";} else {
				echo '<a href="'.$auction.'" target="_blank">Online Auction</a>';}?></strong></td>
          </tr>
          </tbody></table></td>
      <td rowspan="5" align="left" valign="top" width="54%"><table border="0" cellpadding="5" height="365" width="100%">
        <tbody><tr>
          <td colspan="2" align="left" valign="top">
            <font color="#fff8c5">
              </font><div class="style77">
                <font color="#fff8c5">                        	<font color="#fff8c5"><p class="style26" align="center">
                  <strong><?php echo $row_Recordset1['info_title']; ?></strong></p>
                  <span style="font-size: 12pt; line-height: 115%; font-family: "Verdana","sans-serif";">
                    <span class="style31"><?php echo $row_Recordset1['informationtext']; ?></strong><br><br>Call today for a delivery quote!</span></span></font></font></div>
            <font color="#fff8c5">								</font></td>
          </tr>
          <tr>
            <td align="center" bgcolor="#2f291b" valign="top" width="53%"><font face="Arial"><a href="http://www.ringcentral.com" target="Callback_RingMe" onclick='var wind = window; var winop = wind.open; winop("http://www.ringcentral.com/ringme/?uc=56014025,0,0&s=no&v=2", "Callback_RingMe", "resizable=no,width=380,height=240"); return false;'>
              <img src="images/click-to-call-small-o.gif" alt="click-to-call from the web" border="0" height="35" width="134" /></a></font></td>
            <td align="center" bgcolor="#2f291b" valign="top" width="47%"><span class="style6"><span class="style18">
              940-239-9230</span><br />
              <span class="style1">(24hrs a day)</span></span></td>
            </tr>
          </tbody></table>
        </td></tr>
      <tr>
        <td class="style2" align="center" bgcolor="#2f291b" valign="top"><font face="Arial"><span class="style23">
          <a href="horseinfo.php?id=<?php echo $row_Recordset1['idhorses']; ?>">
            <img src="images/moreinfo.jpg" border="0" height="41" width="328" /></a></span></font></td>
        </tr>
      <tr>
        <td class="style2" align="center" bgcolor="#2f291b" valign="top">
        <?php if ($headshot == "") {
		echo "<strong>Online Pictures Coming Soon!!!</strong>";} else {
          echo '<img src="horse_images/' . $headshot . '" height="213" width="300" />';}; ?>      </td>
        </tr>
      <tr>
        <td class="style2" align="center" bgcolor="#2f291b" valign="top">
          <a href="horseinfo.php?id=<?php echo $row_Recordset1['idhorses']; ?>">
            <img src="images/clicktowatch.jpg" border="0" height="40" width="328" /></a></td>
        </tr>
      <tr>
        <td></td>
        </tr>
      <tr>
        <td> </td>
        <td> </td>
        </tr>
      </tbody>
  </table>
  <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

 

In the DB i also have a column that is active yes or no.  How would I tell the repeat region that if column entry for active = NO to skip that record in the repeat region and go to the next record.

 

Link to comment
https://forums.phpfreaks.com/topic/161213-repeat-region-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.