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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

nested repeat regions

Thread began 4/20/2011 5:29 am by acaciasd344844 | Last modified 4/29/2011 10:35 am by acaciasd344844 | 2885 views | 7 replies

acaciasd344844

nested repeat

Hi Jason,

I have managed at last to get the recordset in the right place and the page is starting to come together. I am having trouble with the relationship though.

When our customers decide how many invoices they need to print up to 50 in some cases, they can mark the invoices they wish to print by putting a tick in a box. When these details are ready to be printed the recordset is searched by looking for the boolean tick which is a value of 1. The requested records are then displayed in invoiceid order. Recordset code below...

SELECT *, DATE_FORMAT(datecreated,'%d %M %Y') as printdate
FROM invoice
LEFT JOIN customers ON customers.customerid = invoice.customerid
LEFT JOIN products ON products.invoiceid = invoice.invoiceid
LEFT JOIN preferences ON customers.prefid = preferences.prefid
WHERE invoice.print = '1'
GROUP BY invoice.invoiceid

the nested loop

The second recordset should search for the actual products that should be associated with the relevant invoice, but I am not sure how to link them as the first recordset is using the boolean value as the search criteria. And if I do use that value, it simply displays all the products on every invoice. Recordset code below...

SELECT *
FROM products left join invoice on invoice.invoiceid = products.invoiceid
WHERE invoice.print = '1'
ORDER BY productid

I fully realise that I should use the primary key to link the two repeat regions but I cannot see how I can manage this. Is there another method that I could use?

Any help would be really appreciated


john

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