Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 02-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
  ORDER BY price desc

any reason why 'ORDER BY price desc' wouldnt order the products by price, from highest to lowest in a my sql query?

because it isnt...

yes the column name is 'price'

the full query is jus select all from my table where something = something and this works fine as its showing products, then it has the order by price and them a limit 0,30

all works part from the prices, which just seem random any ideas
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-12-04
lazy student
 
Join Date: Aug 2003
Posts: 362
Thanks: 0
Thanked 0 Times in 0 Posts
giveasyouget is an unknown quantity at this point
umm.. is there an index on the price (should only slow it down, not prevent it from working though)

is the price field a float/integer or is it a varchar? should be a float to get things working properly, or it will order things differently.
__________________
vso volunteer - vietnam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-12-04
ianm's Avatar
Avoiding real work
 
Join Date: Aug 2003
Location: Buckinghamshire
Posts: 1,382
Thanks: 0
Thanked 0 Times in 0 Posts
ianm is an unknown quantity at this point
If it's a VARCHAR you'd get something like this

4
30
3
2
100
10
1
__________________
Those who can do, those who can't talk about it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-12-04
999gi's Avatar
aka Antony
 
Join Date: Aug 2003
Location: Bristol
Posts: 971
Thanks: 0
Thanked 0 Times in 0 Posts
999gi is an unknown quantity at this point
That'd be my thought too
If youve got it as a text type of field rather than a numeric field then itll be sorted alphabetically rather than numerically like

1
111
12
2
21
22398437598324
234
3


etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 02-12-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
it was varchar, silly me


thanks
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7