PDA

View Full Version : Error: 1064



Buddy
30-07-2015, 04:19 PM
I've just completed my first season, everything went as expected. I then create a follow-up season.

After publishing the first set of fixtures, a user inputs his predictions then presses "Submit Predictions" only to get the following error message ... any ideas?

The requested page can't be found. An error has occurred while processing your request.
You may not be able to visit this page because of:


an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page


Go to the Home Page




If difficulties persist, please contact the System Administrator of this site and report the error below.

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 '0,0,0,0,0,0)' at line 1 SQL=INSERT INTO `uim_masterleaguepro_user_log` (user_id,matchday_id,league_id,points,position,win ,draw,lose,matches_played) VALUES (1000,27,,0,0,0,0,0,0)

Buddy
31-07-2015, 05:22 PM
Sorry, my mistake. I had not set up the league properly for the new season. Panic over!

Buddy
31-07-2015, 08:22 PM
After creating a new (second) season, but BEFORE I created a new league for that season, I entered a new week of fixtures. A user attempting to submit predictions caused the error as per messages above.

Once I'd realised the mistake I created the new league, and all the new fixtures entered previously were still in place.
Each of the league participants were able to submit their first predictions of this new season.

Before I entered the results for the fixtures I had a look at the player standings tables.
The new season showed all players who had entered predictions with zero played/points, etc. As expected.
I then looked back to the standings for the first season and noticed the numbers in EVERY column and for every player, had doubled!
However, the values in the "Player Form" and "Top Players" modules were as they should be and not doubled.
The values remained unaltered after running the "Update Score" option.

I updated the results for this first set of fixtures, then re-checked the standings.
After the first week of 12 fixtures, the new table shows each player having played 24 matches and every other item in their record effectively doubled.
As previously, the "Player Form" and "Top Players" modules appear unaffected, but I have the standings tables for both seasons showing double the values they should be showing.

Is this a bug or is it all down to my initial error of trying to submit predictions with no league set up for my new season?

... and is there a way I can rectify the situation?

kostas
31-07-2015, 11:36 PM
It seems to be a bug we will try to recreate the error and fix it.

kostas
03-08-2015, 11:43 AM
Ok we found the problem we will release a fix as soon as possible , but you can manually fix it by changing the file
<joomla directory>/components/com_masterleaguepro/models/standings.php

function getStandings

line~54 after the comments
//masterleague v 1.0.6


$query="SELECT u.id , u.username,SUM(log.points) as points,SUM(log.win) as win,SUM(log.draw) as draw,SUM(log.lose) as lose,SUM(log.matches_played) as matches_played ,SUM(log.goal_for) as goal_for, SUM(log.goal_against) as goal_against , SUM(log.goal_difference) as goal_difference
FROM `#__masterleaguepro_users` mu
INNER JOIN `#__users` u ON mu.user_id=u.id
INNER JOIN `#__masterleaguepro_user_log` log
ON log.user_id=mu.user_id
WHERE log.league_id=$league AND mu.league_id=log.league_id
GROUP BY mu.user_id
ORDER BY points DESC , goal_for DESC , goal_difference DESC";

Buddy
03-08-2015, 12:57 PM
Thanks.
That looks to have fixed the issue.