close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

couple of list queries

Thread began 6/28/2013 8:53 am by Jamie | Last modified 7/01/2013 10:43 am by Jason Byrnes | 914 views | 14 replies |

Jamie

couple of list queries

Hey Jason

Have a couple of list queries please.

1. on an update page, I have a drop down list of categories which you can use to change the category id in the database. What is not happening is that when you first view the update page, the default item shown is the top one rather than what is in the actual database for that product. How would I link the drop down to show this please?

2. on a results page I would like to add a list which would update a filter in a recordset so that only items from what has been selected in the list is shown...

Whatever further info you need from me just let me know

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

1) in design view, select the list, in the property inspector, click the dynamic button.

for the select item equal to option, click the lightning bolt and select the corresponding category column from the update recordset.

2) Use data assist search to set this up.

Sign in to reply to this post

Jamie

thanks Jason

1. pretty much managed to get that working although for some reason, the selected item appears twice in the list (see attached screenshot)

2. is there a step by step guide to this as I have never used the search functionality that WA offers...

cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

1) You may have to add a group by clause to the recordset used to populate the list.

2) No, there is not a step by step guide.

create the basic results page without any filtering, then start the data assist search wizard to create the search for and add the search criteria.

Sign in to reply to this post

Jamie

thanks Jason... how do I group by clause?

will have a stab at the search!

Sign in to reply to this post

Jason ByrnesWebAssist

see this page for details:

http://www.w3schools.com/sql/sql_groupby.asp

Sign in to reply to this post

Jamie

I have tried this and it doesnt work...

SELECT ProductID, ProductSKU, ProductName, ProductPrice, ProductWeight, ProductCartDesc, ProductLongDesc, ProductImage, ProductImage2, ProductImage3, ProductImage4, ProductLive, ProductCategory
FROM products
WHERE ProductID = colname
GROUP BY ProductCategory



its still showing the selected category twice......

Sign in to reply to this post

Jason ByrnesWebAssist

i'll need a copy of the page.

Sign in to reply to this post

Jamie

here you go

Sign in to reply to this post

Jason ByrnesWebAssist

delete line 302 - 313:

php:
<?php

do {  
?>
                <option value="<?php echo $row_WADAproducts['ProductCategory']?>"<?php if (!(strcmp($row_WADAproducts['ProductCategory'], $row_WADAproducts['ProductCategory']))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAproducts['ProductCategory']?></option>
                <?php
} while ($row_WADAproducts mysql_fetch_assoc($WADAproducts));
  
$rows mysql_num_rows($WADAproducts);
  if(
$rows 0) {
      
mysql_data_seek($WADAproducts0);
      
$row_WADAproducts mysql_fetch_assoc($WADAproducts);
  }
?>
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...