Commit 648d915b authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

multi table bug

parent 1df07ab3
...@@ -19,9 +19,12 @@ class Score{ ...@@ -19,9 +19,12 @@ class Score{
$this->db->query($sql); $this->db->query($sql);
if($this->db->has_result()){ if($this->db->has_result()){
while($tempObj = $this->db->fetch_object()){ while($tempObj = $this->db->fetch_object()){
$this->languages[$tempObj->langue] = $this->languages[$tempObj->langue] = $tempObj->langue;
new ScoreTable($this->user, $tempObj->langue); //new ScoreTable creates ather database queries, so we separate both processes
$this->languages[$tempObj->langue]->get_score_table(false); }
foreach($this->languages as $lang){
$this->languages[$lang] = new ScoreTable($this->user, $lang);
$this->languages[$lang]->get_score_table(false);
} }
$this->languages[GlobalScoreTable::ALL_LANG] = $this->languages[GlobalScoreTable::ALL_LANG] =
new GlobalScoreTable($this->user); new GlobalScoreTable($this->user);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment