Radio Streaming - 50% Lifetime Discount with purchase of any Joomla Web Radio Addon. Discount Code: STR15-Z
See Radio Streaming Plans

Results 1 to 7 of 7

Thread: Playerprediction results page

  1. #1
    Super Moderator
    Join Date
    Mar 2012
    Posts
    183

    Playerprediction results page

    --------------------------------------------------
    Topic Transfered from old forum
    --------------------------------------------------

    Hi, another question please.

    On the standings page if you click on the users name and see their predictions and results. If they did not enter a prediction for a certain game then that game does not appear in the list. How do we show all the games even if they did not enter a score.

    Another change on the same page that we'd like to implement is to not show future games. At the moment any user can see future predictions for other users and you could get to a situation with a close result that other players can manipulate their position be viewing their rivals predictions and possibly making changes. The easiest way to do this would be to not fetch any future games on the playerprediction view. Can you let us know how to change that.

    http://www.****.com/your-performance...ction&user=649
    Support Operator
    MultiHosting.com

  2. #2
    Super Moderator
    Join Date
    Mar 2012
    Posts
    183
    --------------------------------------------------
    Topic Transfered from old forum
    --------------------------------------------------

    Hello

    for the first question if you want to see all the matches at the playerprediction panel you can do that by changing file
    <joomla directory>/components/com_masterleaguepro/models/playerprediction.php line 38

    FROM

    " INNER JOIN `#__masterleaguepro_player_prediction` pp ON pp.match_id=m.id AND pp.user_id=".$user_id.

    TO

    " LEFT JOIN `#__masterleaguepro_player_prediction` pp ON pp.match_id=m.id AND pp.user_id=".$user_id.

    note this has not been tested on component just the database so it may cause some errors in the front end , if any error appear contact again to solve it , the intension was to show just the matches the player had predicted so the program had the prediction score, now it will return NULL if the player did not predict.

    for the second question in order to fetch the predictions from matches that already start playing edit the line 39 from the same file
    FROM
    " WHERE m.matchday_id = ".$matchday;

    TO

    "WHERE m.matchday_id = ".$matchday." AND m.match_start_time < CURRENT_TIMESTAMP()";


    Regards
    Support Department
    Support Operator
    MultiHosting.com

  3. #3
    Junior Member
    Join Date
    Aug 2015
    Posts
    13
    Hi support,

    We tried to perform the following correction
    or the second question in order to fetch the predictions from matches that already start playing edit the line 39 from the same file
    FROM
    " WHERE m.matchday_id = ".$matchday;

    TO

    "WHERE m.matchday_id = ".$matchday." AND m.match_start_time < CURRENT_TIMESTAMP()";

    But we receive a code error. Can you check it please?

  4. #4
    Administrator
    Join Date
    Jul 2015
    Posts
    65
    Hello


    please inform us about the error you get, and the version of the component you use (the line reference has changed in version MLP 1.0.6) the line should be at 114 now.

  5. #5
    Junior Member
    Join Date
    Aug 2015
    Posts
    13
    Dear Kostas,

    Sorry for the late reply. We have not received any email in order to be notified that a reply has been posted and we just found by accident.

    We use MLP1.0.6. We receive the following error:
    1064 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 'm.matchday_id = 1 AND m.match_start_time < CURRENT_TIMESTAMP()' at line 1 SQL=SELECT m.match_start_time,th.name as home,ta.name as away,m.home_score,m.away_score,pp.home_prediction, pp.away_prediction,pp.points FROM `jos_masterleaguepro_match` m INNER JOIN `jos_masterleaguepro_teams` th ON th.id=m.home_team INNER JOIN `jos_masterleaguepro_teams` ta ON ta.id=m.away_team INNER JOIN `jos_masterleaguepro_player_prediction` pp ON pp.match_id=m.id AND pp.user_id=470WHERE m.matchday_id = 1 AND m.match_start_time < CURRENT_TIMESTAMP()

    Regards,

    Dan G

  6. #6
    Administrator
    Join Date
    Jul 2015
    Posts
    65
    hello it seems that there is missing a space between `pp.user_id=470` and `WHERE` just leave 1 space before the `WHERE`

  7. #7
    Junior Member
    Join Date
    Aug 2015
    Posts
    13
    Dear Kostas,

    Thank you for the prompt response. It works properly now.

    Regards,

    Dan G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •