1 Reply Latest reply on Feb 5, 2012 10:07 PM by Atmosfera

    ADDT - PHP - Conditional Regions - Help!

    Atmosfera Level 1

      Hi there!


      One question, how can I filter something coming from a database in PHP using ADDT, maybe using a conditional, for example, I have a table with posted jobs, those jobs belongs to departments, for example

      • Brokerage - System
      • Brokerage - Management
      • Brokerage - Services
      • Brokerages - Payroll
      • Carrier - Real Estate
      • Carrier - Documents
      • Carrier - Programming
      • etc.


      If you see, the departments are just 2 Brokerage and Carrier but in the database they are called like I described you Brokerage - Something and Carrier - Something.


      I want to have 2 HTML tables the table in the left with only posting the Brokerage Positions and the one in the right with the Carrier Positions, I used this on the left one: - hey, don't laugh! -



      // Show IF Conditional region1

      if (@$row_rsBJ['Job_Department'] != "Brokerage") {



      <?php do { ?>

      <table width="100%" border="0" cellspacing="2" cellpadding="2">


      <td width="27%" class="ShowJobsPostings"><div align="left"><?php echo KT_formatDate($row_rsBJ['Job_Date']); ?></div></td>

      <td width="73%" class="ShowJobsPostings"><div align="left"><?php echo $row_rsBJ['Job_Department']; ?><br />

      <?php echo $row_rsBJ['CompanyInfo_COName']; ?> <?php echo $row_rsBJ['Job_City']; ?>, <?php echo $row_rsBJ['Job_State']; ?></div></td>



      <?php } while ($row_rsBJ = mysql_fetch_assoc($rsBJ)); ?>

      <?php }


      // endif Conditional region1

      but didn't work, I need to filter with something like "Send me only departments that start with brokerage" or something like that, but my programming expertise is minimal, any idea? or suggestion? Of course, this using ADDTB


      Thanks so much in advance!