OBBLM error. Need help

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

Post Reply
pinkskink
Rookie
Rookie
Posts: 22
Joined: Fri Jun 03, 2016 3:33 pm

OBBLM error. Need help

Post by pinkskink »

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /*****/*****/p*********l/myleaguewebsite.com/lib/class_stats.php on line 187

What does this mean? What do I need to do to remove it and get the standings to show up?

This came when I edited the settings_1.php file to display the current "tournament" (season) listed as ID 21. The last season was 19 and didn't have an error. I also checked ID 20, which was a tournament that I created and then deleted before once I realized I made an error. Both 19 and 20 IDs don't have errors associated with it. Why does "21" make a difference?

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: OBBLM error. Need help

Post by Vanguard »

Shouldn't be an issue with changing the tournament ID. Most likely cause is something has gone awry in your settings file when you've changed the ID or your new tournament is not ID 21.
Can you post a copy of your settings file and a link to your site?

Reason: ''
pinkskink
Rookie
Rookie
Posts: 22
Joined: Fri Jun 03, 2016 3:33 pm

Re: OBBLM error. Need help

Post by pinkskink »

I'll post the settings file when I get home (around 7 cst).

Website is fortworthbloodbowl.com

Currently the standings are set to read ID 20 which is the tournament that was deleted.

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: OBBLM error. Need help

Post by Vanguard »

SO had a quick look at the site, the troubleshooting page is ideal for checking IDs etc and it all looks ok. Your new tournament is indeed ID 21.
I'll wait on you uploading the settings file.

Reason: ''
pinkskink
Rookie
Rookie
Posts: 22
Joined: Fri Jun 03, 2016 3:33 pm

Re: OBBLM error. Need help

Post by pinkskink »

<?php

/*************************
* Local settings for League with ID = X, as per settings_X.php
*************************/
preg_match('/settings_(.*?)\.php/', __FILE__, $match);
$get_lid = $match[1];
$settings['stylesheet'] = 4;
$settings['lang'] = 'en-GB';

/*********************
* General
*********************/

// Change the Title after the = sign. Do not change things before the = sign.
$settings['banner_subtitle'] = false ;
// Button text for league URL.
$settings['league_url_name'] = 'League Forum';
// Stylesheet for text etc. Currently stylesheet 1 is the only existing stylesheet, so don't change it!
// Default language. Existing: en-GB, es-ES, de-DE, fr-FR, it-IT.
// Default is true. Generate coach, team and player links on the front page?
$settings['fp_links'] = true;
$settings['league_name'] = get_alt_col('league_prefs','f_lid',$get_lid,'league_name');
$settings['banner_title'] = get_alt_col('league_prefs','f_lid',$get_lid,'league_name');
// URL of league home page, if you have one. If not then leave this empty, that is = '' (two quotes only), which will disable the button.
$settings['league_url'] = get_alt_col('league_prefs','f_lid',$get_lid,'forum_url');
// The welcome text appears below the title.
$settings['welcome'] = get_alt_col('league_prefs','f_lid',$get_lid,'welcome');
// The next text appears when you click the rules button.
$settings['rules'] = get_alt_col('league_prefs','f_lid',$get_lid,'rules');
$get_prime = get_alt_col('league_prefs','f_lid',$get_lid,'prime_tid');
$get_second = get_alt_col('league_prefs','f_lid',$get_lid,'second_tid');

// Keep the following the same.
$settings['tourlist_foldup_fin_divs'] = false; // Default is false. If true the division nodes in the tournament lists section will automatically be folded up if all child tournaments in that division are marked as finished.
$settings['tourlist_hide_nodes'] = array('league', 'division', 'tournament'); // Default is array('league', 'division', 'tournament'). In the section tournament lists these nodes will be hidden if their contents (children) are finished. Example: If 'division' is chosen here, and all tours in a given division are finished, then the division entry will be hidden.

/*********************
* Rules
*********************/

// Please use the boolean values "true" and "false" wherever default values are boolean.

$rules['max_team_players'] = 16; // Default is 16.
$rules['static_rerolls_prices'] = false; // Default is "false". "true" forces re-roll prices to their un-doubled values.
$rules['player_refund'] = 0; // Player sell value percentage. Default is 0 = 0%, 0.5 = 50%, and so on.
$rules['journeymen_limit'] = 11; // Until a team can field this number of players, it may fill team positions with journeymen.
$rules['post_game_ff'] = false; // Default is false. Allows teams to buy and drop fan factor even though their first game has been played.

$rules['initial_treasury'] = 1000000; // Default is 1000000.
$rules['initial_rerolls'] = 0; // Default is 0.
$rules['initial_fan_factor'] = 0; // Default is 0.
$rules['initial_ass_coaches'] = 0; // Default is 0.
$rules['initial_cheerleaders'] = 0; // Default is 0.

// For the below limits, the following applies: -1 = unlimited. 0 = disabled.
$rules['max_rerolls'] = -1; // Default is -1.
$rules['max_fan_factor'] = 9; // Default is 9.
$rules['max_ass_coaches'] = -1; // Default is -1.
$rules['max_cheerleaders'] = -1; // Default is -1.

/*********************
* Standings pages
*********************/

$settings['standings']['length_players'] = 30; // Number of entries on the general players standings table.
$settings['standings']['length_teams'] = 30; // Number of entries on the general teams standings table.
$settings['standings']['length_coaches'] = 30; // Number of entries on the general coaches standings table.

/*********************
* Front page messageboard
*********************/

$settings['fp_messageboard']['length'] = 10; // Number of entries on the front page message board.
$settings['fp_messageboard']['show_team_news'] = true; // Default is true. Show team news on the front page message board.
$settings['fp_messageboard']['show_match_summaries'] = true; // Default is true. Show match summaries on the front page message board.

/*********************
* Front page boxes
*********************/

/*
The below settings define which boxes to show on the right side of the front page.

Note, every box MUST have a UNIQUE 'box_ID' number.
The box IDs are used to determine the order in which the boxes are shown on the front page.
The box with 'box_ID' = 1 is shown at the top of the page, the box with 'box_ID' = 2 is displayed underneath it and so forth.
*/

/*********************
* Front page: tournament standings boxes
*********************/
$settings['fp_standings'] = array(
# This will display a standings box of the top 6 teams in node (league, division or tournament) with ID = 1
array(
'id' => 20, # Node ID
'box_ID' => 1,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'tournament', # This sets the node to be a tournament. I.e. this will make a standings box for the tournament with ID = 1
'infocus' => true, # If true a random team from the standings will be selected and its top players displayed.
/*
The house ranking system (HRS) NUMBER to sort the table against.
Note, this is ignored for "type = tournament", since tours have an assigned HRS.
Also note that using HRSs with fields such as points (pts) for leagues/divisions standings makes no sense as they are tournament specific fields (i.e. it makes no sense to sum the points for teams across different tours to get the teams' "league/division points", as the points definitions for tours may vary).
*/
'HRS' => 7, # Note: this must be a existing and valid HRS number from the main settings.php file.
'title' => 'Y2Karnage Standings', # Table title
'length' => 40, # Number of entries in table
# Format: "Displayed table column name" => "OBBLM field name". For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'fields' => array('Name' => 'name', 'TV' => 'tv', 'PTS' => 'pts', 'W' => 'won', 'L' => 'lost', 'D' => 'draw', '%' => 'win_pct', 'CAS' => 'cas', 'Score Diff' => 'sdiff',),
),
# This will display a standings box of the top 6 teams in node (league, division or tournament) with ID = 1
array(
'id' => 14, # Node ID
'box_ID' => 2,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'tournament', # This sets the node to be a tournament. I.e. this will make a standings box for the tournament with ID = 1
'infocus' => true, # If true a random team from the standings will be selected and its top players displayed.
/*
The house ranking system (HRS) NUMBER to sort the table against.
Note, this is ignored for "type = tournament", since tours have an assigned HRS.
Also note that using HRSs with fields such as points (pts) for leagues/divisions standings makes no sense as they are tournament specific fields (i.e. it makes no sense to sum the points for teams across different tours to get the teams' "league/division points", as the points definitions for tours may vary).
*/
'HRS' => 1, # Note: this must be a existing and valid HRS number from the main settings.php file.
'title' => 'RPG League Standings', # Table title
'length' => 40, # Number of entries in table
# Format: "Displayed table column name" => "OBBLM field name". For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'fields' => array('Name' => 'name', 'TV' => 'tv', 'PTS' => 'pts', 'W' => 'won', 'L' => 'lost', 'D' => 'draw', '%' => 'win_pct', 'CAS' => 'cas', 'Score Diff' => 'sdiff',),
),

);

/*********************
* Front page: leaders boxes
*********************/

$settings['fp_leaders'] = array(
# Please note: You can NOT make expressions out of leader fields e.g.: 'field' => 'cas+td'
# This will display a 'most CAS' player leaders box for the node (league, division or tournament) with ID = 1
array(
'id' => 21, # Node ID
'box_ID' => 3,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'tournament', # This sets the node to be a tournament. I.e. this will make a leaders box for the tournament with ID = 11
'title' => 'Most Individual Casualties (Y2Karnage)', # Table title
'field' => 'cas', # For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'length' => 5, # Number of entries in table
'show_team' => true, # Show player's team name?
),
# This will display a 'most TD' player leaders box for the node (league, division or tournament) with ID = 2
array(
'id' => 21, # Node ID
'box_ID' => 4,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'tournament', # This sets the node to be a tournament. I.e. this will make a leaders box for the tournament with ID = 11
'title' => 'Most Individual Scores (Y2Karnage)', # Table title
'field' => 'td', # For the OBBLM fields available see http://nicholasmr.dk/obblmwiki/index.ph ... tomization
'length' => 5, # Number of entries in table
'show_team' => true, # Show player's team name?
),
);

/*********************
* Front page: event boxes
*********************/

$settings['fp_events'] = array(
/*
Event boxes can show for any league, division or tournament the following:
dead - recent dead players
sold - recent sold players
hired - recent hired players
skills - recent player skill picks
*/
array(
'id' => $get_lid, # Node ID
'box_ID' => 8,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'league', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
'title' => 'Latest Dead Players (League)', # Table title
'content' => 'dead', # Event type
'length' => 5, # Number of entries in table
),

array(
'id' => $get_lid, # Node ID
'box_ID' => 9,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'league', # This sets the node to be a tournament. I.e. this will make an event box for the tournament with ID = 1
'title' => 'Latest Skills (League)', # Table title
'content' => 'skills', # Event type
'length' => 5, # Number of entries in table
),
);

/*********************
* Front page: latest games boxes
*********************/

$settings['fp_latestgames'] = array(
# This will display a latest games box for the node (league, division or tournament) with ID = 1
array(
'id' => $get_lid, # Node ID
'box_ID' => 10,
// Please note: 'type' may be either one of: 'league', 'division' or 'tournament'
'type' => 'league', # This sets the node to be a league. I.e. this will make a latest games box for the league with ID = 1
'title' => 'Recent Games (League)', # Table title
'length' => 5, # Number of entries in table
),
);

Reason: ''
User avatar
Vanguard
Super Star
Super Star
Posts: 922
Joined: Sun Jun 08, 2008 8:27 am
Location: Glasgow
Contact:

Re: OBBLM error. Need help

Post by Vanguard »

Ok, so based on this file, you should have 7 boxes on your front page.
  1. Y2Karnage Standings - Missing
  2. RPG League Standings - Missing
  3. Most Individual Casualties (Y2Karnage)
  4. Most Individual Scores (Y2Karnage)
  5. Latest Dead Players (League)
  6. Latest Skills (League)
  7. Recent Games (League)
The IDs for the two Standings boxes are set on lines 96 and 114 where they are set to 20 and 14 respectively.
Looking at your league details those tournaments do not exist. I suspect you want 21 for the first one, not sure what your second league is intended to be.

Reason: ''
pinkskink
Rookie
Rookie
Posts: 22
Joined: Fri Jun 03, 2016 3:33 pm

Re: OBBLM error. Need help

Post by pinkskink »

So i know that I'm currently showing tournament ID 20, but only because when I switch the box to show standings for ID 21, I get the error message. I have 20 there so I don't get an error message across the web page.

Also, Tournament 14 (RPG League) was supposed to run alongside our main league (Y2Karnage) but we didn't get enough sign-ups and so we quashed it. But since those standings don't show on the front page and that is fine with me.

Reason: ''
Post Reply