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

rating

Record Count

Thread began 12/30/2014 9:21 am by Mushroom-Graphics | Last modified 12/30/2014 5:22 pm by Ray Borduin | 308 views | 4 replies |

Mushroom-Graphics

Record Count

Hi,

I am trying to add a record count to a results page for Manufacturers. If a Manufacturer has say 20 products on the site I want to display "20 products" in a TD in their row. Is there a tutorial I can use? I have downloaded MySQLi

Sign in to reply to this post

Ray BorduinWebAssist

If you have a recordset with products on the page then the record count will be available from the bindings. If you want to get a count without showing the results you can do that with SQL. Just create a recordset like:

SELECT Count(*) AS ProductCount FROM ProductsTable WHERE manufacturer = 'the manufacturer'

Then you can display the ProductCount field from that recordset

Sign in to reply to this post

Mushroom-Graphics

Hi,

Still having a little difficulty. I can not seem to get the count to reflect the rows they are in. I am attaching the page.

Attached Files
manufacturers_results.php
Sign in to reply to this post

Ray BorduinWebAssist

Put it all into one recordset so that you get a new count for each row like:

SELECT man_id, man_code, man_name, updated, (SELECT Count(*) FROM pmap WHERE pmap.mc = man_code) AS ProductCount FROM manufacturers ORDER BY man_name ASC

Sign in to reply to this post

Mushroom-Graphics

I keep getting a SQL error in DW but it works. Cool thanks

Sign in to reply to this post

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