other characters' low-hanging fruit

Started by Naienko, October 14, 2008, 04:24:17 PM

Naienko

I've been trying to check out the low-hanging fruit report on the toons of some of my friends, and it returns this error everytime:


A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND badges.active = '1' AND badges.game_id IN (NULL, '99') AND badges_popular' at line 5

SELECT badges_popular.*, badges.position, badge_types.badge_type, `villain_name` AS badge_name, `villain_image_name` AS badge_image_name FROM (`badges_popular`) RIGHT JOIN `badges` ON badges_popular.badge_id = badges.badge_id RIGHT JOIN `badge_types` ON badges_popular.badge_type_id = badge_types.badge_type_id WHERE badges_popular.badge_id NOT IN(SELECT badges_by_char.badge_id FROM badges_by_char WHERE char_id=) AND badges.active = '1' AND badges.game_id IN (NULL, '99') AND badges_popular.badge_type_id NOT IN ('7') AND badges.fruit_exclude != 1 AND badges.badge_type_id != 7 ORDER BY badges_popular.badge_count DESC LIMIT 50


Is that supposed to happen?

Tazhyngarth

Looks like that Toon specifically was affected by something that was done on our end.  What you need to do is tell your Friends to log the Toons into the game and select a few Badges that are Hero/Villain only, whatever Alignment they are on, with TNT or HS running and it should correct it.

All your friends that have this problem, need to do this with all the Toons that are having this issue.  Also be sure to tell them that we're sorry about this happening to them. :P

Naienko

How widespread is this problem supposed to be?  Cos SaintNicster just tried to view my Naienko's low-hanging fruit and got the same error -- and I upped badges on her YESTERDAY.  Hero-only badges.  I think there's an error in the sql syntax specifically on the profile pages, related to whether or not the account viewing the page is the owner, another registered account, or a guest.

SaintNicster

Quote from: Tazhyngarth on October 14, 2008, 04:45:23 PM
Looks like that Toon specifically was affected by something that was done on our end.  What you need to do is tell your Friends to log the Toons into the game and select a few Badges that are Hero/Villain only, whatever Alignment they are on, with TNT or HS running and it should correct it.

All your friends that have this problem, need to do this with all the Toons that are having this issue.  Also be sure to tell them that we're sorry about this happening to them. :P
[/s]

Nope... Check the message and the SQL.  I bolded the part where the error is happening according to the message.  It's missing the ID if you aren't looking at one of your toons
QuoteSELECT badges_popular.*, badges.position, badge_types.badge_type, `villain_name` AS badge_name, `villain_image_name` AS badge_image_name FROM (`badges_popular`) RIGHT JOIN `badges` ON badges_popular.badge_id = badges.badge_id RIGHT JOIN `badge_types` ON badges_popular.badge_type_id = badge_types.badge_type_id WHERE badges_popular.badge_id NOT IN(SELECT badges_by_char.badge_id FROM badges_by_char WHERE char_id=) AND badges.active = '1' AND badges.game_id IN (NULL, '99') AND badges_popular.badge_type_id NOT IN ('7') AND badges.fruit_exclude != 1 AND badges.badge_type_id != 7 ORDER BY badges_popular.badge_count DESC LIMIT 50
EDIT: I'm dumb...

EDIT2: or not? *tries to remember SQL stuff*


Naienko

Quote from: Naienko on October 14, 2008, 04:24:17 PM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND badges.active = '1' AND badges.game_id IN (NULL, '99') AND badges_popular' at line 5

SELECT badges_popular.*, badges.position, badge_types.badge_type, `villain_name` AS badge_name, `villain_image_name` AS badge_image_name FROM (`badges_popular`) RIGHT JOIN `badges` ON badges_popular.badge_id = badges.badge_id RIGHT JOIN `badge_types` ON badges_popular.badge_type_id = badge_types.badge_type_id WHERE badges_popular.badge_id NOT IN(SELECT badges_by_char.badge_id FROM badges_by_char WHERE char_id=) AND badges.active = '1' AND badges.game_id IN (NULL, '99') AND badges_popular.badge_type_id NOT IN ('7') AND badges.fruit_exclude != 1 AND badges.badge_type_id != 7 ORDER BY badges_popular.badge_count DESC LIMIT 50

You mean there?  SOMETHING needs to be before that ')', even if it's just *.

SuckerPunch

No, you're right.

And in the interest of our security / privacy, I've cleaned up the error page so it doesn't display the actual SQL messages, and instead emails us on errors.

Should have been done a long time ago, really.

Tazhyngarth

There was a Query that was run, there's a News Post about it on CIT, that's what caused this and it's only affecting about 40 Accounts or so.  So not widespread, but those Accounts in general are just the unlucky ones.

SuckerPunch

Quote from: Tazhyngarth on October 14, 2008, 07:47:03 PM
There was a Query that was run, there's a News Post about it on CIT, that's what caused this and it's only affecting about 40 Accounts or so.  So not widespread, but those Accounts in general are just the unlucky ones.

Nope, that's not the issue. We have this fixed internally, will release it live soon.

Naienko

Quote from: Tazhyngarth on October 14, 2008, 07:47:03 PM
There was a Query that was run, there's a News Post about it on CIT, that's what caused this and it's only affecting about 40 Accounts or so.  So not widespread, but those Accounts in general are just the unlucky ones.

Please, please pay attention to the substance of the bug instead of jumping to conclusions.  The problem you are speaking of cannot apply to my character Naienko, since I updated her badges with a hero-only badge just yesterday, and yet the sql error I have found does occur when her fruit is accessed by someone not me.

SuckerPunch

Taz means well.

The bug should be fixed now.

Tazhyngarth

Dammit :-[.  I wasn't jumping to conclusions but you are right, basically, I didn't have all the details in front of me when I posted.

My apologies, I'm just having way too much happen all at once today between work and here.  It won't happen again.

gothess

Quote from: Tazhyngarth on October 14, 2008, 08:37:50 PM
Dammit :-[.  I wasn't jumping to conclusions but you are right, basically, I didn't have all the details in front of me when I posted.

My apologies, I'm just having way too much happen all at once today between work and here.  It won't happen again.

It happens. *hugs* ;)
-T
(aka Ani)