Home | Webstore
Latest News: FHM 5 Available - OOTP 19 Available! - MLB Manager 2018 Available Now

Perfect Team is LIVE!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 19 > OOTP Mods > OOTP Mods - Database Tools

OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome

Reply
 
Thread Tools
Old 04-18-2013, 05:25 PM   #81
MogulChamp
All Star Reserve
 
MogulChamp's Avatar
 
Join Date: Aug 2004
Posts: 656
Thanks: 11
Thanked 9x in 4 posts
Quote:
Originally Posted by fhomess View Post
I've not seen it fail to import the draft order properly or the issue you report. If you PM me with commish access to your install, I'll take a look.
Sent
MogulChamp is offline   Reply With Quote
Old 04-18-2013, 09:19 PM   #82
MogulChamp
All Star Reserve
 
MogulChamp's Avatar
 
Join Date: Aug 2004
Posts: 656
Thanks: 11
Thanked 9x in 4 posts
Fixed it. For some reason I had to enable draft timer
MogulChamp is offline   Reply With Quote
Old 04-19-2013, 12:24 AM   #83
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
Quote:
Originally Posted by MogulChamp View Post
Fixed it. For some reason I had to enable draft timer
Ah, thanks for letting me know. I do recommend upgrading to 3.0.9. There are some draft fixes in between what you've got and what's posted there, although nothing related to what you described here.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 04-19-2013, 07:22 PM   #84
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
When trying to install StatsLab, no matter what I put in the config.txt file, I get the following error:

ERROR: dbopen.php file not found in SQL upload directory. Please create this file based on dbopen.php.sample.
After doing so, return to this page.

I am certain the I have the dbopen.php file in there. Any ideas what I could be missing?
congotim is offline   Reply With Quote
Old 04-19-2013, 07:50 PM   #85
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
If you the contents of config.txt are correct and the file is there, the only other possible problem is permissions to access dbopen.php.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 04-22-2013, 02:38 AM   #86
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
If you the contents of config.txt are correct and the file is there, the only other possible problem is permissions to access dbopen.php.
I am DEFINITELY missing somethings here. What should the two files (config and dbopen) look like? I am 99.9% sure that the dbopen file is not my issue... I must have the config.txt file wrong, but it says to give the path to the installation directory. How does anything know where the db folder is?
congotim is offline   Reply With Quote
Old 04-22-2013, 03:01 AM   #87
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by congotim View Post
I am DEFINITELY missing somethings here. What should the two files (config and dbopen) look like? I am 99.9% sure that the dbopen file is not my issue... I must have the config.txt file wrong, but it says to give the path to the installation directory. How does anything know where the db folder is?
As usual, as soon as I ask for help, I figure out the problem. New problem, though... It won't let me sign in with any of the 3 commish accounts using the password "baseball" any ideas?
congotim is offline   Reply With Quote
Old 04-22-2013, 03:43 AM   #88
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by dangarion View Post
Ok I'm ignoring that.

I was getting the ERROR: OOTP SQL Utilities not configured properly (no ootp_sql_admin table)


Interesting, I went ahead and clicked on "Admin" from the validator and it said the db wasn't loaded and to click on a link to load it. I did that and it actually was able to load the whole db... with no timeouts (remember how the old version used to do that???). And it looks like I can login now.

Wow... Statslab has really progressed from the last time I was able to use it with our old league... Amazing.
*sigh* Once again I find the fix after wasting people's time posting... The quoted response here fixed it for me
congotim is offline   Reply With Quote
Old 04-25-2013, 01:45 AM   #89
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
I, for the life of me, cannot figure out how to create a widget for something as simple as standings. Can anyone offer any hints on this?
congotim is offline   Reply With Quote
Old 04-25-2013, 01:09 PM   #90
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
I'm not sure what happened but our Statslab stopped updating stats, even though imports seem to go fine...

I'm assuming the problem now is that the run_development.php action is taking too much time on Dreamhost.

[Thu Apr 25 09:11:08 2013] [error] [client 75.85.84.98] Premature end of script headers: run_development.php, referer: Peanuts and Cracker Jack Baseball League
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!

Last edited by dangarion; 04-25-2013 at 01:16 PM.
dangarion is offline   Reply With Quote
Old 04-25-2013, 06:00 PM   #91
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
Quote:
Originally Posted by congotim View Post
I, for the life of me, cannot figure out how to create a widget for something as simple as standings. Can anyone offer any hints on this?
Here's a sample for standings:
Code:
/widget.php?show=standings&league_id=100&sub_league=0&division=1
Quote:
Originally Posted by dangarion View Post
I'm not sure what happened but our Statslab stopped updating stats, even though imports seem to go fine...

I'm assuming the problem now is that the run_development.php action is taking too much time on Dreamhost.

[Thu Apr 25 09:11:08 2013] [error] [client 75.85.84.98] Premature end of script headers: run_development.php, referer: Peanuts and Cracker Jack Baseball League
It sounds like your import didn't quite work. The other pages of StatsLab simply rely on the database and the development script won't have any affect on whether or not you get new data on the last sim pages.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 04-25-2013, 06:35 PM   #92
dangarion
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Quote:
Originally Posted by fhomess View Post
Here's a sample for standings:
Code:
/widget.php?show=standings&league_id=100&sub_league=0&division=1

It sounds like your import didn't quite work. The other pages of StatsLab simply rely on the database and the development script won't have any affect on whether or not you get new data on the last sim pages.
Well great. This has been going on for a couple imports now. The player pages aren't showing any new statistics.

I went ahead and repaired and optimized the database and ran the development report again. It is still showing out of date and not working. Should I just delete all the data in player_developement?
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!

Last edited by dangarion; 04-25-2013 at 07:28 PM.
dangarion is offline   Reply With Quote
Old 04-26-2013, 01:05 AM   #93
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
I'd be happy to take a look at it before you try that if you like.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 04-26-2013, 02:10 AM   #94
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
Here's a sample for standings:
Code:
/widget.php?show=standings&league_id=100&sub_league=0&division=1
That works and seems so simple... Yet, if I take out "&division=1" I thought it would show the whole sub league, but no such luck. Where is the flaw in my logic? Sorry for taking up so much time with my rookie questions, just trying to understand!
congotim is offline   Reply With Quote
Old 04-26-2013, 02:07 PM   #95
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
Nope, it just doesn't work that way... specifying a division is required.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 04-27-2013, 04:19 AM   #96
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
Nope, it just doesn't work that way... specifying a division is required.
Bummer. Is there a way to pull the top performers out? Maybe one for top performing hitters and one for top performing pitchers?
congotim is offline   Reply With Quote
Old 04-27-2013, 06:32 AM   #97
arca
Minors (Rookie Ball)
 
Join Date: May 2008
Posts: 37
Thanks: 2
Thanked 0x in 0 posts
Hello, does statlab function for offline game, or quickstart game? Is there a stats software to analyze the stats of our game when you just play quickstart game and non online game? Thank you for answer
arca is offline   Reply With Quote
Old 04-29-2013, 03:09 PM   #98
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
Quote:
Originally Posted by congotim View Post
Bummer. Is there a way to pull the top performers out? Maybe one for top performing hitters and one for top performing pitchers?
Can you clarify why you need to have the division not specified? If you're in a league with only 1 division, there is still a division identifier for the 1 division that exists. I can see a desire to add a wild card standings option. What other use case is there that you're looking for.

As for top performers, there's always a question of exactly what you mean by that. Here's a sample of a stat leaderboard:
Code:
widget.php?league_id=100&sub_league=0&stat=vorp&topX=5
In this case, the sub_league is optional, so you could report on the entire league if you want. Use "pvorp" for pitcher VORP if that's what you're going for.

Quote:
Originally Posted by arca View Post
Hello, does statlab function for offline game, or quickstart game? Is there a stats software to analyze the stats of our game when you just play quickstart game and non online game? Thank you for answer
There's no difference between a quickstart game and any other type of OOTP game once the game has begun.

As for running StatsLab for a non-online league, yes this is possible, however it needs to run in the context of a PHP website with MySQL. For example, it's possible to set up an Apache server on your PC and run PHP in there. You can then run StatsLab locally for any of your leagues. This is one of the ways in which I test StatsLab, and there are tutorials online on how to set up Apache with PHP and MySQL for either PC or Mac.

As for tools other than StatsLab to analyze your league, there is OOTP:OU, which also requires a website context, and there was a tool a few versions ago that would read the dat files directly. However, I don't recall seeing a recent update to it.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.
fhomess is offline   Reply With Quote
Old 05-01-2013, 01:48 PM   #99
congotim
Minors (Rookie Ball)
 
Join Date: Aug 2012
Posts: 48
Thanks: 0
Thanked 1x in 1 post
Quote:
Originally Posted by fhomess View Post
Can you clarify why you need to have the division not specified? If you're in a league with only 1 division, there is still a division identifier for the 1 division that exists. I can see a desire to add a wild card standings option. What other use case is there that you're looking for.

As for top performers, there's always a question of exactly what you mean by that. Here's a sample of a stat leaderboard:
Code:
widget.php?league_id=100&sub_league=0&stat=vorp&topX=5
In this case, the sub_league is optional, so you could report on the entire league if you want. Use "pvorp" for pitcher VORP if that's what you're going for.

The reason for not having the division specified was that i wanted to show the full standings for the entire league, if possible. I am using this on the front page of my home screen (Championship League Baseball | Where the Winning Doesn't Come Easy). Right now I have not been able to find a wordpress widget that displays php for me so I am using iFrames which I hate... That said, I would love to be able to use one or two iFrames rather than 6.

As for the stats, I like being able to list guys by VORP. Is there any way to get it to show the stats too or am I out of luck? One final question that may limit firther questions: Is there a list of usable functions for the widgets.php page so I can tinker some on my own. I have no idea what does or doesnt work other than what you have showed me so far
congotim is offline   Reply With Quote
Old 05-01-2013, 02:50 PM   #100
fhomess
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,449
Thanks: 165
Thanked 1,155x in 437 posts
Widgets are intended to be a quick, modular way to get some information about your league to your home page. The modularity allows for flexibility, such as putting it behind a jQuery tabs, jQuery accordion, or something similar.

There isn't a way to specify additional stats to display with a player leaderboard widget.

Anyway, here is some documenation that should help:

OnDemand Widgets
On‐demand widgets allow you to call some code to display snippets of data on your website outside of StatsLab. The script that creates them is widget.php, and by including a link to the widget.php file with the appropriate parameters defined, you can get a widget to display on your website that will automatically display the most recent stats after every SQL upload.

The following parameters can be applied to widgets.php to generate a widget:
  • show: The “show” parameter defines what type of widget you want to display. The following options are available:
    • leaders - By setting it to ‘leaders’, it’ll display the top teams in each division in an unnumbered list format.
    • standings - By setting it to ‘standings’, you can get the divisional standings for any division in your league (with additional parameters).
    • draftList (need version 3.0.10) - By setting it to 'draftList', you can get it to display the progress of your StatsLab draft. This has additional parameters:
      • lastX - tells it how many of the most recent picks to display
      • nextX - tells it how many of the upcoming picks to display
    • potw - Will display the current player of the week for the sub league specified. Includes player photo, name, team, and some basic stats.
    • botm - Will display the current batter of the month for the sub league specified. Includes player photo, name, team, and some basic stats.
    • potm - Will display the current pitcher of the month for the sub league specified. Includes player photo, name, team, and some basic stats.
    • rotm - Will display the current rookie of the month for the sub league specified. Includes player photo, name, team, and some basic stats.
    • Anything else, including omitting this parameter, will result in a listing of the top players in a specific stat (stat must be specified).
  • league_id: Specifies the league that you wish to display the widget for. Will default to StatsLab’s primary league if omitted.
  • sub_league: Specifies the sub‐league you wish to display. Use the sub league’s ID number or abbreviation (if unique). If omitted, leagues will be combined. This parameter must be specified to display a division’s standings.
  • division: Specifies the division you wish to display. Use the division ID as the value, and it must be combined with the sub_league parameter. It has no effect on player stat widgets.
  • topX: For player stat widgets, this parameter defines how many players to display. By default, the top 3 players will be included.
  • stat: For player stat widgets, this parameter defines which stat to display the top X of.

The following stats are available for player stats widgets (note that this list is more extensive than for static widgets):
Batting Stats: AB, H, 2B, 3B, HR, RBI, R, SB, CS, BB, K, SF, SH, IBB, HP, GDP, PA, AVG, OBP, SLG, OPS, wOBA, VORP
Pitching Stats: W, L, SV, IP, K, BB, R, ER, G, GS, HP, HA, BF, GB, FB, HRA, BK, GF, QS, CG, SHO, HLD, ERA, WHIP, VORP

To include any of the above stats, set the stat parameter equal to the lowercase version of the stat (e.g. avg=batting average), with the following exceptions:
K, BB, R, G, GS, HP, and VORP for pitchers should be preceded with a “p” to differentiate them from the batter stat version (e.g.: k=batting K’s, pk=pitching K’s).
Use “s” for SV.

Examples:
  • widget.php?stat=h&topX=7&sub_league=NL – Will display the top 7 NL leaders in hits.
  • widget.php?stat=pk&sub_league=AL – Will display the top 3 AL leaders in pitching strikeouts
  • widget.php?show=leaders – Will display the division leading teams in each division.
  • widget.php?show=standings&division=1&sub_league=1 – Will display the standings for sub_league 1, division 1 (in my test case, the NL Central).
  • widget.php?stat=ops&topX=10 – Will display the top 10 batters in OPS across all subleagues (e.g. All MLB, rather than just AL or NL).
  • widget.php?show=draftList&league_id=100&lastX=5&ne xtX=5 - Will display the 5 most recent picks, and the 5 upcoming ones
  • widget.php?show=potw&league_id=100&sub_league=0 - Will display the Player of the Week for sub league 0
You can test your on‐demand widget out in your browser before adding the code to call it to your website. If you wrap it appropriately, you can do some nice things with CSS for displaying it.

Widget CSS
wdgT – Applied to <table> tags
wdgH – Applied to <tr> tags contained inside <thead> tags.
wdgH_l – Applied to <td> tags inside <thead> tags that might require different alignment.
wdg1, wdg2 – Applied to alternating <tr> tags
wdg1_l, wdg2_l – Applied to alternating rows <td> tags that might require different alignment
wdgUL – Applied to <ul> tag in division leaders widget
wdgLI – Applied to <li> tags in division leaders widget
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Baseball Cards - Full list of known templates and documentation on card development.

Last edited by fhomess; 05-01-2013 at 02:52 PM.
fhomess is offline   Reply With Quote
2 thanks for this post:
JWay (10-07-2013), WillieMaysHayes (01-08-2014)
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:35 AM.

 

Major League Baseball trademarks and copyrights are used with permission of MLB Advanced Media, L.P. Minor League Baseball trademarks and copyrights are used with the permission of Minor League Baseball. All rights reserved.

The Major League Baseball Players Association (www.MLBPLAYERS.com ) is the collective bargaining representative for all professional baseball players of the thirty Major League Baseball teams and serves as the exclusive group licensing agent for commercial and licensing activities involving active Major League baseball players. On behalf of its members, it operates the Players Choice licensing program and the Players Choice Awards, which benefit the needy through the Major League Baseball Players Trust, a charitable foundation established and run entirely by Major League baseball players. Follow: @MLB_Players; @MLBPAClubhouse; @MLBPlayersTrust

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2017 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright © 2018 Out of the Park Developments