Witch Hunt - Errors and bugs

Keep track of who updates their character profile and when

Moderator: Carasak

Re: Witch Hunt [v1.1.1]

Postby Carasak » Fri Feb 23, 2007 1:31 pm

PleegWat wrote:The SQL error is because of the subquery. You need MySQL 4.1 for that. That's not a problem with this addon per se - Roster does require MySQL 4.1 or higher. However it is possible to rewrite this query with a LEFT JOIN then check if `member_id` IS NULL.


done

ds001 wrote: Awesome! Smile Thank you for doing my request! Smile

If you look at my Roster you'll see that the Slackers arn't being ordered correctly. Any idea what gives?

wow.roa-guild.org/rost...=witchHunt


fixed date order bug

new version 1.1.2
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Witch Hunt [v1.1.2]

Postby Elethil » Fri Feb 23, 2007 3:45 pm

I'm getting the following sql error. Seems a bit different then the other one?

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 '(p.dateupdatedutc,'%m/%d/%y %H:%i:%s') as MyDate, p.name, m.nam

My host runs phpmyadmin 4.0.26

I'm using witch hunt 1.1.2

If this is fixable other then updateing phpmyadmin (I wold if I could but not my server) I'd love to use this addon. It looks really nice and usefull. I agree however with one of the posts above that it would be nice to open it up for the rest of guildies to see. Seeing about 90% of our members are slackers ;).
Last edited by Elethil on Fri Feb 23, 2007 3:48 pm, edited 1 time in total.
User avatar
Elethil
WR.net Journeyman
WR.net Journeyman
 
Posts: 147
Joined: Wed Jul 05, 2006 10:28 pm

Re: Witch Hunt [v1.1.2]

Postby Corbism » Fri Feb 23, 2007 5:17 pm

Elethil wrote:I'm getting the following sql error. Seems a bit different then the other one?

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 '(p.dateupdatedutc,'%m/%d/%y %H:%i:%s') as MyDate, p.name, m.nam

My host runs phpmyadmin 4.0.26

I'm using witch hunt 1.1.2

I am receiving the same error and have the same versions as you listed.
Last edited by Corbism on Fri Feb 23, 2007 5:18 pm, edited 1 time in total.
User avatar
Corbism
WR.net Apprentice
WR.net Apprentice
 
Posts: 51
Joined: Fri Sep 29, 2006 10:48 pm
Location: Seattle, WA

Witch Hunt [v1.1.2]

Postby microbone » Sat Feb 24, 2007 6:40 am

Carasak just forget my post about folders.....

wrong post, wrong place sry for that m8 must have been sleepy or something!

But I´m getting the same error as already mentioned twice.

Best Regards
microbone
User avatar
microbone
WR.net Apprentice
WR.net Apprentice
 
Posts: 26
Joined: Thu Jul 13, 2006 12:00 am

Re: Witch Hunt [v1.1.2]

Postby Carasak » Mon Feb 26, 2007 11:42 am

Mysql error "...(p.dateupdatedutc,'%m/%d/%y %H:%i:%s')..."
Using a function to format the date which is available from Mysql v4.1

until find time to change the code to work with 4.0.x only option to ifix it is upgrading your mysql version
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Re: Witch Hunt [v1.1.2]

Postby reshurc » Mon Feb 26, 2007 3:16 pm

This is the code you use, right?

Code: Select all
$resultChar = $wowdb->query("SELECT STR_TO_DATE(p.dateupdatedutc,'%m/%d/%y %H:%i:%s') as MyDate, p.name, m.name, m.class, m.guild_rank FROM ".ROSTER_PLAYERSTABLE." as p, ".ROSTER_MEMBERSTABLE." as m where m.guild_rank<= ".$addon_conf['witchHunt']['gRank']." AND m.name=p.name ORDER BY MyDate Desc  ") or die(mysql_error());


If STR_TO_DATE is what you use to convert the date, isn't it possible to convert that to variable earlier? by using php date()?
[-No posters allowed, only posters about posters not allowed allowed-]
Image
User avatar
reshurc
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Jan 12, 2007 9:19 am

Re: Witch Hunt [v1.1.2]

Postby Carasak » Mon Feb 26, 2007 3:20 pm

cant convert it earlier cause there is no earlier moment then the query of the string to convert from the database.
only thing i can do there is not convert it in the sql query and process the data after with php (but thats what i wanted to avoid)
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Re: Witch Hunt [v1.1.2]

Postby reshurc » Mon Feb 26, 2007 3:50 pm

p.dateupdatedutc...
where do you get this from?
From roster?
[-No posters allowed, only posters about posters not allowed allowed-]
Image
User avatar
reshurc
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Jan 12, 2007 9:19 am

Re: Witch Hunt [v1.1.2]

Postby Carasak » Mon Feb 26, 2007 3:52 pm

yes from roster_players table
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Re: Witch Hunt [v1.1.2]

Postby reshurc » Tue Feb 27, 2007 12:15 pm

as far as I can see, what you are doing, is comparing char names from one table to the other?
how does it work, if a GM upload the guildprofiler.lua it populates one list. when a player uploads characterprofiler.lua the other is populated?
[-No posters allowed, only posters about posters not allowed allowed-]
Image
User avatar
reshurc
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Jan 12, 2007 9:19 am

Re: Witch Hunt [v1.1.2]

Postby Carasak » Tue Feb 27, 2007 1:13 pm

reshurc wrote:as far as I can see, what you are doing, is comparing char names from one table to the other?
how does it work, if a GM upload the guildprofiler.lua it populates one list. when a player uploads characterprofiler.lua the other is populated?


uploading the roster as GM with characterprofiler populates the roster_members table. (well and the charinfo of the uloading person into roster_players table)
uploading characterprofiler as normal member populates roster_players table.
so those not in roster_players table never uploaded their char

just a side note guildprofiler.lua is never uploaded. data from guildprofiler addon is stored in characterprofiler.lua
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Witch Hunt - Errors and bugs

Postby dhirmadi » Tue Mar 06, 2007 2:25 pm

getting the smae SQL error, and nope, i cannot update my MYSSQL DB as it is not mine

Code: Select all
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 '(p.dateupdatedutc,'%m/%d/%y %H:%i:%s') as MyDate, p.name, m.nam


any other alternatives
User avatar
dhirmadi
WR.net Apprentice
WR.net Apprentice
 
Posts: 15
Joined: Sun Aug 06, 2006 9:01 pm

Witch Hunt - Errors and bugs

Postby Carasak » Wed Mar 07, 2007 5:44 pm

only alternative is putting the logic of reformating the date and ordering into php code instead of doing it directly in SQL but i rather wouldnt do that.
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

Re: Witch Hunt - Errors and bugs

Postby Guntak » Mon Mar 12, 2007 10:01 pm

For those of you stuck on 4.0.x (like I am) try this...

Change
Code: Select all
SELECT STR_TO_DATE(p.dateupdatedutc, '%m/%d/%Y %H:%i:%s') as MyDate


To
Code: Select all
SELECT p.dateupdatedutc as MyDate


...

Then Change
Code: Select all
$dat2 = explode('-',$dat1[0]);
$newDate= $dat2[2].'/'.$dat2[1].'/'.$dat2[0].' '.$dat1[1];


To
Code: Select all
$dat2 = explode('/',$dat1[0]);
$dat3 = date("m/d/Y", mktime(0,0,0,$dat2[0],$dat2[1],$dat2[2]));
$newDate= $dat3.' '.$dat1[1];
Guntak
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Sun Dec 17, 2006 1:11 pm

Re: Witch Hunt - Errors and bugs

Postby Carasak » Mon Mar 12, 2007 11:11 pm

thanks Guntak
that should get rid of mysql errors on pre 4.1 version

disadvantage...date is not ordered correctly
User avatar
Carasak
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Tue Aug 15, 2006 2:33 am
Location: Spain

PreviousNext

Return to Witch Hunt

Who is online

Users browsing this forum: No registered users and 0 guests

cron