Author Topic: Any PHP / Mysql people on here?  (Read 6373 times)

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« on: July 25, 2006, 10:47:42 AM »
I need some help changing the "Stats" page on the DKP site.

It's a relatively small change, which I'm sure someone with knowledge will be able to do quickly.

Under the Raids column, I'd like another column tidied "60 days%" which will give the users raiding attendance percentage over a 60 day period.

The actual calculation has already been done in the "viewmembers.php" so it'll just be a case of sorting out the "stats.php" to reflect the new column.

You need to be able to sort on this column.

Any help please?

(see attached file)
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Bluey

  • LANSE Elder
  • *****
  • Posts: 3709
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« Reply #1 on: July 25, 2006, 10:51:16 AM »
ask Sencerd

Anoth

  • Guest
Re: Any PHP / Mysql people on here?
« Reply #2 on: July 25, 2006, 10:57:33 AM »
I have a big book next to me called PHP and MySQL web development...unfortunately it's been there for a year and i've not dared look at it lol.

Trogwar

  • Guest
Any PHP / Mysql people on here?
« Reply #3 on: July 25, 2006, 11:18:05 AM »
Jason, I can help with this feature. But seems this two files which you offer to download is not enough. :-) FTP-access to DKP site files would be nice. Maybe you can contact me by MSN (or Skype, or Google-talk, or whatever you want) so we can make some hacks and debug it in-place.

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« Reply #4 on: July 25, 2006, 11:35:26 AM »
It should be enough, the data you are looking for has already been resuested in "viewmembers.php" under the search string for the 60 days field.

I just want that data replicated as in one of the columns in the raids colunm.

I'll gladly ftp up modified stats.php files for testing, but am obviously reluctant to give out data.
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Trogwar

  • Guest
Any PHP / Mysql people on here?
« Reply #5 on: July 25, 2006, 11:52:22 AM »
Well, I going to install test copy of EQDKP to debug it on my own server then =P But it takes some time to get it work.

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« Reply #6 on: July 25, 2006, 12:44:31 PM »
sorted (almost)

Just can't get it to sort - not a big deal tho.

You need to create an account & change your template to anything other than wow_style.

You can then see the 60 days attandance.
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Sencerd

  • GeForce 8800 Ultra
  • *****
  • Posts: 1146
    • http://www.reload-network.co.uk/
Re: Any PHP / Mysql people on here?
« Reply #7 on: July 25, 2006, 01:17:28 PM »
I'll take a look at it if you like Jason, what have you done so far?
Nostalgia isn't what it used to be.

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Re: Any PHP / Mysql people on here?
« Reply #8 on: July 25, 2006, 01:26:59 PM »
this:
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Sencerd

  • GeForce 8800 Ultra
  • *****
  • Posts: 1146
    • http://www.reload-network.co.uk/
Re: Any PHP / Mysql people on here?
« Reply #9 on: July 25, 2006, 01:46:52 PM »
try this:
Nostalgia isn't what it used to be.

Sencerd

  • GeForce 8800 Ultra
  • *****
  • Posts: 1146
    • http://www.reload-network.co.uk/
Re: Any PHP / Mysql people on here?
« Reply #10 on: July 25, 2006, 02:13:04 PM »
actually that wont work, hang on
Nostalgia isn't what it used to be.

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« Reply #11 on: July 25, 2006, 02:13:44 PM »
Almost.

I get the column (as i had it)
I can now push the button to sort

When you push on the sort button it calls:

(you need to register & set your default page to something other than wow_style)

http://www.lanse.co.uk/dkp/stats.php?s=&o=4.0&show=

and i get:

Could not obtain member information
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Sencerd

  • GeForce 8800 Ultra
  • *****
  • Posts: 1146
    • http://www.reload-network.co.uk/
Re: Any PHP / Mysql people on here?
« Reply #12 on: July 25, 2006, 02:20:10 PM »
why did you put this in the $sort_order array:

4 => array('member_raid_count_60 desc', 'member_raid_count_60'),


where did you get that from?
Nostalgia isn't what it used to be.

jason

  • LANSE Admin
  • LANSE Elder
  • *****
  • Posts: 7304
    • http://www.lanse.co.uk
Any PHP / Mysql people on here?
« Reply #13 on: July 25, 2006, 02:24:49 PM »
;) gussed  ;)
i5-2500k
Asus P8P67
2x 4gb DDR3 1600 hz OCZ
1 x Dell Perc 6/i
4 x Samsung 2TB (raid 5)
1 x WD VelociRaptor WD3000HLFS
Asus 5870 1gb PCI-E

Sencerd

  • GeForce 8800 Ultra
  • *****
  • Posts: 1146
    • http://www.reload-network.co.uk/
Re: Any PHP / Mysql people on here?
« Reply #14 on: July 25, 2006, 02:31:19 PM »
hmm, well, its sorting them by the database column, and there isnt a column for the 60 days percentage, itll take a much more extensive hack to allow you to order by 60 days

(unless there is a 60 days column in the db, can u check)
Nostalgia isn't what it used to be.