Top used smilie error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Top used smilie error
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
[ Register or login to view links on this board. ]

I have the same Forum statistics installed. If you notice on yours as well as mine, the Top Used Smilie stat is wrong. The number of uses doesn't go in order. I have found the error and don't know how to fix it.

Run this query in mysql and you will see the error.

SELECT  *
FROM  `nuke_bbsmilies`
WHERE smile_stat >0
ORDER  BY smile_stat DESC


That is similar to the query used by the file. The problem is mysql is sorting the results by on the first number in smilie_stat column (which is the number of times the smilie is used).

For example 6 would show up above 23. 6 is greater than 2, but not 23. Why does mysql ORDER BY command do this? How do I make it realize 6 is less than 23? Its only comparing the first digit.

***I just realized this is in the wrong section. Sorry, I can't move it.***


Back to top Reply with quote
#2   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I'm an idiot. I figured it out. smilie_stat is set as type "varchar", change it to "int"and everything works.

icon_eek.gif



Back to top Reply with quote
#3   
Marshalls
CZ Newbie
Marshalls has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Aug 04, 2004
0.00 posts per day
Posts: 3
Points: 440
   
Does anybody know where you can download this mod??



Back to top Reply with quote
#4   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
Search for it on the download section of [ Register or login to view links on this board. ]



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum