close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Order multiple columns in recordset

Thread began 11/19/2012 9:57 am by bill3786 | Last modified 11/21/2012 4:28 pm by bill3786 | 1421 views | 18 replies


Order multiple columns in recordset

The clients site has been running sucessfully for 4 months now but they have now asked for the following two changes.

1. Results from the database are displayed on the products_Results page using the default setting of ProductID ascending.
The client would now like to display the products ordered by the product price descending, showing the highest priced products first.
On this site there are two columns for prices, one column for UK customers in sterling (ProductPrice) and another for prices in euros for all non-UK customers (ProductEuroPrice).
The display of prices is controlled by an "if else" statement which depends on the the users country of origin selected at registration. So all UK registered customers (if) see sterling prices and are shown an "add to cart" button and can buy online in sterling. All non-UK customers (else) see euro prices only but dont see an "add to cart" button and are instructed to email their order and subsequently pay over the phone.

To order the display of products for the sterling prices ONLY would be a simple process by adding "ORDER BY ProductPrice DESC" to the recordset.
So my question is, how do you apply the "ORDER BY (for both price columns) DESC" statement in the recordset that will order both the ProductPrice (sterling) and the ProductEuroPrice columns for both UK and non-UK customers.
Attached are the product_Results and product_Detail pages.
Will the solution that is applied to the Results page affect the Detail page?

2. The display of products on the site is contolled in the recordset by a ProductLive column so that products with a value of 1 are displayed and those with a value of 0 are hidden.

The client would now like the facility to choose to display some of the hidden products but not allow them to be purchased, maybe with an "Out of Stock" message displayed somwhere or displayed on clicking the "Add to Cart" button or disabling the "Add to Cart" button etc etc. The client is open to suggestions on how this can be achieved on the site.

There is no stock control facilty on the site nor does the client want to add stock control, they simply want to be able to show some of the hidden products but not allow them to be purchased.

Attached Files

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





Ease of use


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