close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Subsequent Results Pages Showing Code

Thread began 9/26/2012 1:00 pm by reiter303441179 | Last modified 10/09/2012 12:17 pm by Jason Byrnes | 2783 views | 16 replies |

reiter303441179

Subsequent Results Pages Showing Code

On subsequent results pages there is code intermingled in with the content which is not present on the initial results page. I figure there is something causing this but cannot figure out what. I've attached a screen shot. Thanks for your help

Cameron

Sign in to reply to this post

Jason ByrnesWebAssist

the screen shot is not readable. can you also send a copy of the page so i can seer the code.

Sign in to reply to this post

reiter303441179

Jason, here's a pdf of the page. I didn't know any other way to do it so if you need it another way let me know with a little instruction. I also did a different screen shot the pertains to the issue.

Attached Files
results_page.pdf
Sign in to reply to this post

Jason ByrnesWebAssist

the following code on your page:


php:
<a href="products_detail.php?ProductID=<?php echo($row_WADAproducts['ProductID']); ?>" ><?php echo(isset($_GET["pageNum_WADAproducts"])?"&pageNum_WADAproducts=".intval($_GET["pageNum_WADAproducts"]):""); ?>




should be:

php:
<a href="products_detail.php?ProductID=<?php echo($row_WADAproducts['ProductID']); ?><?php echo(isset($_GET["pageNum_WADAproducts"])?"&pageNum_WADAproducts=".intval($_GET["pageNum_WADAproducts"]):""); ?>" >



it occurs in a few spots

Sign in to reply to this post

reiter303441179

Thanks Jason. I never would have found that without your help.

Another question; How do I filter a filter? On the attached page I have a filter to filter the products by manufacturer. I'm trying to filter the manufacturers so only manufacturers populate who have products in the category being viewed. I have tried a "show if recordset not empty" but that won't work. Also, I have not been able to properly input an option for "show all" so that you can click on it to repopulate the page with all the products in the category after you've already filtered the results and want to go back.

Attached Files
category.pdf
Sign in to reply to this post

Jason ByrnesWebAssist

  I'm trying to filter the manufacturers so only manufacturers populate who have products in the category being viewed  




how are manufacturers linked to products in your database?

using different types of joins in your query can achieve the results you are after to join the manufacturers and products table together.

Using a inner join will only return a result if there is a march in both tables. See this page for more details on join queriers:
Join_(SQL)


for details on clearing the search filter, see the following thread:
showpost.php?p=99028&postcount=2

Sign in to reply to this post

reiter303441179

Originally Said By: Jason Byrnes
  how are manufacturers linked to products in your database?  



In the products table they are a number in a column which is converted to a name in another table named productmanufacturers. I don't know if that was what you were looking for.

I'll check out those other threads.

*Edit. So how would the innerjoin look like in the recordset?

Cameron

Sign in to reply to this post

Jason ByrnesWebAssist

I cant really give an example of how your SQL would look, as i dont know how your database is structured.

The page i linked to has a number of examples for creating joined queries.

Sign in to reply to this post

reiter303441179

Jason I got it to work with an inner join but it lists the manufacturers as many times as there are products for the manufacturer. So, if the manufacturer has 10 products in that particular category, the manufacturer is listed 10 times in the filter. Is there a way so that the manufacturer is listed only once? I figure it has something to do with my inner join.

Here's the inner join:
SELECT *
FROM productmanufacturers
INNER JOIN products ON productmanufacturers.ManufacturerID = products.ProductManufacturerID
WHERE ProductCategoryID = Category (I used this as it is the url parameter for the page)
ORDER BY ManufacturerName ASC

Sign in to reply to this post

Jason ByrnesWebAssist

add a group by condition after the order by:


ORDER BY ManufacturerName ASC
GROUP BY ManufacturerName

Sign in to reply to this post
loading

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