close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Two recordsets on one page - how to restrict one of those to not display the results shown in the other?

Thread began 6/25/2015 12:16 pm by Nathon Jones Web Design | Last modified 6/29/2015 2:08 pm by Nathon Jones Web Design | 689 views | 6 replies

iain331081

I had a similar requirement ages ago, which I assume is the same sort of thing - the homepage on the site had news articles on it, but with the most recent ones given more prominence, like this:

http://www.mphrp.org

The trick turned out to be to use one recordset, and then use some PHP to control which records you show in each section. So that example has this to show the main story at the top:

<?php
mysql_data_seek($WADAtbnews, 0);
$row_WADAtbnews = mysql_fetch_assoc($WADAtbnews);
?>
CONTENT HERE

This to show the next three:

<?php for($i=1;$i<=3;$i++) { ?>
<?php
mysql_data_seek($WADAtbnews, $i);
$row_WADAtbnews = mysql_fetch_assoc($WADAtbnews);
?>
CONTENT HERE
<?php } ?>

And these to show the two columns of the oldest news further down:

<?php for($i=4;$i<=6;$i++) { ?>
<?php
mysql_data_seek($WADAtbnews, $i);
$row_WADAtbnews = mysql_fetch_assoc($WADAtbnews);
?>
CONTENT HERE
<?php } ?>

and

<?php for($i=7;$i<=9;$i++) { ?>
<?php
mysql_data_seek($WADAtbnews, $i);
$row_WADAtbnews = mysql_fetch_assoc($WADAtbnews);
?>
CONTENT HERE
<?php } ?>

Hope that makes sense and helps.

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

Content

rating

Layout

rating

Ease of use

rating

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...