Database error (Incorrect integer value)

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

Database error (Incorrect integer value)

Postby dynamixcoder » Sun Aug 05, 2007 5:59 am

hi all,

im running IIS 6.0/PHP 5/MySQL 5/Dragonfly CMS 9.1.2.1 /WoWRosterDF v1.7.3.0 / Armory sync

my problem is ever since i migrated my apache server to IIS 6, armory sync wont work... yes its all configured to work in IIS.

this is what i get when i try to sync to armory:

Code: Select all
includes\db\db.php
CMS Warning line 75: On /index.php?name=WoWRosterDF&file=addon&roster_addon_name=ArmorySynch While executing query "INSERT INTO `cms_wowrosterdf_roster_players` SET `name` = 'Polymorpher', `guild_id` = '1', `dodge` = '6.63', `parry` = '0', `block` = '0.00', `mitigation` = '16.37', `crit` = '4.33', `sessionHK` = '0', `sessionCP` = '0', `yesterdayHK` = '0', `yesterdayContribution` = '0', `lifetimeHK` = '295', `lifetimeHighestRank` = '0', `lifetimeRankName` = '', `honorpoints` = '0', `arenapoints` = '0', `stat_int` = '65', `stat_int_c` = '190', `stat_int_b` = '125', `stat_int_d` = '0', `stat_agl` = '47', `stat_agl_c` = '60', `stat_agl_b` = '13', `stat_agl_d` = '0', `stat_sta` = '47', `stat_sta_c` = '128', `stat_sta_b` = '81', `stat_sta_d` = '0', `stat_str` = '42', `stat_str_c` = '51', `stat_str_b` = '9', `stat_str_d` = '0', `stat_spr` = '71', `stat_spr_c` = '123', `stat_spr_b` = '52', `stat_spr_d` = '0', `stat_armor` = '577', `stat_armor_c` = '727', `stat_armor_b` = '150', `stat_armor_d` = '0', `stat_def` = '', `stat_def_c` = '0', `stat_def_b` = '', `stat_def_d` = '', `res_frost` = '5', `res_frost_c` = '5', `res_frost_b` = '0', `res_frost_d` = '0', `res_arcane` = '5', `res_arcane_c` = '5', `res_arcane_b` = '0', `res_arcane_d` = '0', `res_fire` = '5', `res_fire_c` = '5', `res_fire_b` = '0', `res_fire_d` = '0', `res_shadow` = '5', `res_shadow_c` = '5', `res_shadow_b` = '0', `res_shadow_d` = '0', `res_nature` = '15', `res_nature_c` = '15', `res_nature_b` = '0', `res_nature_d` = '0', `level` = '39', `server` = 'Uldaman', `talent_points` = '0', `money_c` = '', `money_s` = '', `money_g` = '', `exp` = '', `race` = 'Night Elf', `class` = 'Druid', `health` = '1753', `mana` = '3394', `sex` = 'Male', `hearth` = '', `dateupdatedutc` = '08/04/07 00:00:00', `CPversion` = '', `timeplayed` = '0', `timelevelplayed` = '0', `melee_power` = '82', `melee_rating` = '165', `melee_range` = '116:165', `ranged_power` = '50', `ranged_rating` = '0', `ranged_range` = '13:14', `clientLocale` = 'enUS', `member_id` = '36'" the following error occured: Incorrect integer value: '' for column 'stat_def' at row 1 In: C:\Inetpub\wwwroot\modules\WoWRosterDF\lib\wowdb.php on line: 96


ive tried anything i can think of but no luck..... any ideas?
dynamixcoder
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sun Aug 05, 2007 5:49 am

Re: Database error (Incorrect integer value)

Postby dynamixcoder » Mon Aug 06, 2007 6:56 am

amazing almost 30 views and not one reply....
dynamixcoder
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sun Aug 05, 2007 5:49 am

Database error (Incorrect integer value)

Postby zanix » Mon Aug 06, 2007 7:32 am

Look at the end of that error
Code: Select all
the following error occurred: Incorrect integer value: '' for column 'stat_def' at row 1

This means stat_def is getting set '' which is an incorrect value for this column in the database

Somewhere in the code isn't setting a correct default value for this stat
I haven't ever seen the armory sync code, so beyond this I cannot help you
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Database error (Incorrect integer value)

Postby dynamixcoder » Mon Aug 06, 2007 1:01 pm

yeah i know what its doing and means!

i even tried to remove the string to attempt to bypass the error and it just says the same error for the next process in the code in this case stats_def_a incorrect integer or something.
dynamixcoder
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sun Aug 05, 2007 5:49 am

Re: Database error (Incorrect integer value)

Postby dynamixcoder » Mon Aug 06, 2007 2:08 pm

well i finally found a resolve to this (on my own)

apparently whats happening here is it getting a bad char from armory (i.e. " ) this only happens for a few colums.

temp fix or perm:

every table it has an error for, open cms_wowrosterdf_roster_players in design mode.

find all the tables that its having a problem with and change the field type to varChar.

the fields that were a problem for me were:
Stat_def
Stat_def_b
Stat_def_d
Money_c
Money_s
Money_g

change the type of them all to Varchar and you should have it working again.
dynamixcoder
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Sun Aug 05, 2007 5:49 am

Database error (Incorrect integer value)

Postby zanix » Tue Aug 07, 2007 12:06 am

This is not the correct solution
The code needs to anticipate for blank values and insert 0 instead
These fields are int() for a reason, because they only should be numeric, and a numeric field take up less space than a varchar() field
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Database error (Incorrect integer value)

Postby Kristoff22 » Wed Aug 08, 2007 5:15 am

I'd be happy to default those fields for now, but if something should be defaulting because of a datatype constraint, it should be done in the business logic (ie the update_char function), otherwise I'm only solving the problem for this addon.
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

Database error (Incorrect integer value)

Postby zanix » Wed Aug 08, 2007 6:00 am

I believe in Roster 1.8, these fields are defaulted to 0 in the database structure.
Also, you really shouldn't be tying into Roster's update functions, you should really build your own, but that's my opinion.
However, in Roster 1.8, we are improving default insertion of data, so it might not be a problem then.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 2 guests

cron