close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

combining 2 tables using a 3rd table as the link table.

Thread began 7/28/2014 9:44 am by Christopher West | Last modified 8/01/2014 2:23 pm by Christopher West | 1497 views | 13 replies

Christopher WestCommunity Expert

ok Im attaching the 3 tables as images and I am attaching a crude example I put together in photoshop (however because of the featured table it will allow me to control in which order the products and feedback are displayed for each individual page).

plus i am copying the current code to display the actual repeat region to give it context.


if ("".$row_rsFeatured['FeaturedType']  ."" == "1") {  // WebAssist Show If
        <div class="feature-heading">Featured Product</div>
        <?php do { ?>
          <p class="feature-name"><?php echo $row_rsFeatured['ProductName']; ?></p>
          <div class="clearfix"></div>
          <p class="feature-price">From only £<?php echo $row_rsFeatured['ProductPrice']; ?></p>
          <p class="feature-image"><a href="../product.php?Product=<?php echo $row_rsFeatured['ProductLink']; ?>"><img  src="../images/products/large/<?php echo $row_rsFeatured['ProductImage']; ?>" width="250" alt="<?php echo $row_rsFeatured['ProductImageTitle']; ?>"/></a></p>
          <?php } while ($row_rsFeatured mysql_fetch_assoc($rsFeatured)); ?>
// ("".$row_rsFeatured['FeaturedType']  ."" == "1")
      <div class="clearfix"></div>
if ("".$row_rsFeatured['FeaturedType']  ."" == "2") {  // WebAssist Show If
  <div class="feedback-heading">What our Customers say!</div>
  <p class="feedback-other"><a href="../what-our-customers-say.php">Read other Customer Reviews</a></p>
       <?php do { ?>
          <div class="clearfix"></div>
          <p class="feedback-quote"><?php echo $row_rsFeatured['FeedbackText']; ?></p>
          <p class="feedback-name"><strong><?php echo $row_rsFeatured['FeedbackSalutation']; ?> <?php echo $row_rsFeatured['FeedbackFirstName']; ?> <?php echo $row_rsFeatured['FeedbackLastName']; ?> | <?php echo $row_rsFeatured['FeedbackLocation']; ?></strong></p>
          <p class="feedback-date"><?php echo date('jS M Y',strtotime($row_rsFeatured['FeedbackDate'])); ?></p>
         <?php } while ($row_rsFeatured mysql_fetch_assoc($row_rsFeatured)); ?>
// ("".$row_rsFeatured['FeaturedType']  ."" == "2")

and obviously to determine the page i am using

$basefile = basename ( $_SERVER["REQUEST_URI"] );

WHERE FeaturedLocale = '$basefile'

the basefile is stored in the featured table under FeaturedLocale

the ProductID OR FeedbackID is stored in the featured.FeaturedTypeID table.
AND FeaturedType 1 means a product and FeaturedType 2 means feedback
(currently im not using FeaturedPosition as of yet (but in the future this will allow the client to reposition content)


Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...