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

Product Options to Sort Ascending by OptionName instead of by OptionID

Thread began 8/23/2010 4:38 pm by jowen372871 | Last modified 8/24/2010 3:32 pm by jowen372871 | 449 views | 2 replies |

jowen372871

Product Options to Sort Ascending by OptionName instead of by OptionID

See the direct link to the live example below – notice that cougars is at the bottom of the drop-down list of options for this product. We would like these options to sort ascending by OptionName instead of OptionID. I thought this would be a simple mod to the SQL statement, but it was a bit above my head when attempting to make this mod.

Products_Detail.php?ProductID=71

Any help is appreciated.

Sign in to reply to this post

Ray BorduinWebAssist

It would be just a matter of changing the associated SQL.

It looks like it is already done on that page...

but anyway it would be a matter of updating the query:

SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s

to:

SELECT ps3_options.OptionID, OptionName FROM ps3_options INNER JOIN ps3_optiongroups ON ps3_optiongroups.OptionGroupID = ps3_options.OptionGroupID WHERE ps3_options.OptionGroupID = %s ORDER BY OptionName

on both the products_detail.php page and the products_detail_lookup.php page.

Sign in to reply to this post

jowen372871

Success!

Thanks - that is what I needed. The reason it looked as if it was ordered that way already is that the client input them that way. Only they added one later that should have sorted between "b" and "d" but it came after "s" because it was ordering by ID and not name.

Muchas Gracias!

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