1 (edited by Ponitheone 2015-08-08 13:27:42)

recently i wanted to add top arena team script and i found this

http://pastebin.com/QfMgJgcV

it is trinity script i know but i works for OC too without experiencing compile errors but ingame it doesnt work because of the arena tables

QueryResult_AutoPtr result = CharacterDatabase.PQuery

is it possible to update queries for OC arena tables?

btw my core.exe crashes when i use the following command and haven't target

.pinfo

here it is crashlog http://pastebin.com/FJ3UKdDr

thanks in advance

i'm edited sql queries to OC tables
http://pastebin.com/1YU8MgdN
Need test, i not have arena team on server smile

Sorry for my bad english

3 (edited by Ponitheone 2015-08-08 13:24:44)

thanks for quick reply obana !
to test it quick we do not actually need arena team on server simply run queries on database for example when i run this query

SELECT a.name, b.rating, seasonWins, b.played - b.wins2, b.wins, b.games - b.wins, b.rank, a.captainguid, a.type FROM arena_team a LEFT JOIN arena_team_stats b ON b.arenateamid = a.arenateamid

it says

Unknown column 'seasonWins' in 'field list' 

I actually do not have column named seasonWins
these are my tables in case you need

CREATE TABLE `arena_team` (
`arenateamid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`name` CHAR(255) NOT NULL,
`captainguid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`BackgroundColor` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`EmblemStyle` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`EmblemColor` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`BorderStyle` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`BorderColor` INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
-----
CREATE TABLE `arena_team_member` (
`arenateamid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`guid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`played_week` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`wons_week` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`played_season` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`wons_season` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`personal_rating` INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`, `guid`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
-----
CREATE TABLE `arena_team_stats` (
`arenateamid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`rating` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`games` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`wins` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`played` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`wins2` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`rank` INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

change 'seasonWins' to 'b.wins2'

Sorry for my bad english

THANKS! it works well now, there was something wrong about the third query but i figured it out as i am quick learner smile