CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Sorting problem

Print topic Send  topic

Author Message
sumpen30


Posts: 16
Posted: 09/01/2005, 9:31 AM

I have a small problem with sorting. I recently created this site for a client www.shoppinghuset.se. It is all in Swedish but it is mainly done in CCS 2.0.

I have a page where you can sort the products by name, price, in stock etc. What happens is that it is sorts by the requested field but it groups them by company. There are multiple tables involved but I don't see what it would make a difference.

See for yourself at http://www.shoppinghuset.se/productCategories.php?product_cat_id=513

If any input I would be greatful because customer is not happy.

/Sumpen
_________________
Guldshoppen.se - Gold and Silver Jewlery
http://www.guldshoppen.se
A website entirely created by CCS
View profile  Send private message
peterr


Posts: 5971
Posted: 09/01/2005, 10:29 AM

I tried sorting by price (Pris) and don't see any problem. The page http://www.shoppinghuset.se/productCategories.php?produ...C&companyPage=9 even shows two different companies mixed up (Dell and Apple) but correctly sorts by the price.
I'm assuming that you already fixed your problem. (?)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
sumpen30


Posts: 16
Posted: 09/05/2005, 12:39 PM

Thanks peterr for your reply. No I have not sorted out the problem unforunately. If you click on produktnamn (product name) you will see that dell is ahead of Apple which is not right.

Any ideas why this might be happening?

Sumpen30
_________________
Guldshoppen.se - Gold and Silver Jewlery
http://www.guldshoppen.se
A website entirely created by CCS
View profile  Send private message
Walter Kempees
Posted: 09/06/2005, 3:05 AM

Is the Manufacturer name in a separate table and then linked by some sort of
id to the main product table ?
Then I guess that the manufacturer_id for Apple is higher then the DELL one.
Check the SQL fired for the sort, or the main sort order.
Get the tables joined so you can sort on Manufacturrer name and not Id .

Just thinking........

Walter
donb

Posts: 52
Posted: 09/06/2005, 5:23 AM

Evidently you have event code which processes the URL parameters in order to decide the sort order.

I see some are all lowercase, others have a capitalized value like "So". Maybe the case of these parameters is the problem - it's not matching on the uppercase letters.

If you have use a switch() statement to evaluate the parameters, did you put a 'break' statement to terminate each case?
_________________
http://www.gotodon.com/ccbth
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.