PDA

View Full Version : Championship error



Sjf0464
05-11-2016, 03:51 PM
Hi,

Just setting up championship as now have 16 players but have got the following error message :-

An error has occurred.
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 ')' at line 1 SQL=INSERT INTO `#__masterleaguepro_minileague_users` (user_id,minileague_id,group_id,season_points,seas on_goal_difference) VALUES (418,2,2,0,)

Any help would be great, regards, Steve

Sjf0464
05-11-2016, 07:06 PM
Hi,

Think the problem was because some of the players didn't have any points, after this weeks game result entered, the Championship was able to be created.

kostas
07-11-2016, 02:37 PM
Hello,

This issue will be resolved in the next available version , but you can fix it on your own
file : <joomla directory>/administrator/components/com_masterleaguepro/models/multileague.php

add to the function insertUserToGroup (should be at line 346)

FROM:



public function insertUserToGroup($user,$league,$group,$points,$go al_difference){
$query=$this->db->getQuery(true);
$query="INSERT INTO `#__masterleaguepro_minileague_users` (user_id,minileague_id,group_id,season_points,seas on_goal_difference) VALUES (".$user.",".$league.",".$group.",".$points.",".$goal_difference.")";
$this->db->setQuery($query);


return $this->db->query();
}


TO:




public function insertUserToGroup($user,$league,$group,$points,$go al_difference){
if($goal_difference==""){
$goal_difference=0;
}
$query=$this->db->getQuery(true);
$query="INSERT INTO `#__masterleaguepro_minileague_users` (user_id,minileague_id,group_id,season_points,seas on_goal_difference) VALUES (".$user.",".$league.",".$group.",".$points.",".$goal_difference.")";
$this->db->setQuery($query);


return $this->db->query();
}

Sjf0464
07-11-2016, 08:26 PM
Thanks for the reply.
i have looked but cannot seems to see multileague.php in folder models.

regards

kostas
08-11-2016, 09:21 AM
Hello,
make sure you look for multileague.php into the administrator part of the component

Best Regards

Sjf0464
08-11-2016, 11:29 AM
My bad, many thanks