• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

How to show result of recordset plus the next record somewhere else on page

Hi

I was wondering how to go about showing a record within a recordset and somewhere else on the page shows the next record in line.  Is this possible?  I would also like it to update when someone clicks next which in turn updates the next record data.

I know how to do ordinary recordsets but can't think how to show the next record somewhere else.

Any suggestions how to do this would be a great help

Regards

Daniel
0
gingerwinger
Asked:
gingerwinger
2 Solutions
 
Havin_itCommented:
Hi Daniel,

You didn't mention which server-technology you are using, so I'll assume PHP as it's the only one I've worked in myself. First-off, DW's options for recordset display are limited. Whether they solve your specific problem or not, it's worth having a look at www.macromedia.com (look for the Dreamweaver Exchange) and www.dmxzone.com both of which have a lot of free extensions to improve scripting support in all languages.

Having said that, here's a simple method of converting a multi-row recordset into a numeric array of arrays that can be re-used (unlike a DW Repeat Region behaviour).

$list = array();
do { $list[] = $row_yourRecordSet; }
while ($row_yourRecordSet = mysql_fetch_assoc($yourRecordSet));

Then you can access row 1, column 'foo' as

$list[0]['foo']

Hope that's some use. I guess the principle extends to other languages...
0
 
gingerwingerAuthor Commented:
Thanks for your reply...

I am using ASP but I'll take a look at what you have suggested and get back.

Thank you for your time

Daniel
0
 
triserosCommented:
Create your recordset then, in the html code between your first record and second record add the following

<% yourRecordsetName.moveNext %> ' this will now move the recordset to the next record

If you can give me some more info on the function of updating I can help you there too but the moment that should at least fix the display issue
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now