소스 검색

Fixed an error when adding teams

Iñigo Valentin 5 년 전
부모
커밋
24187b0fba
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      application/action/new_team.php

+ 2 - 2
application/action/new_team.php

@@ -187,7 +187,7 @@
         }
         }
 
 
         $j = 0;
         $j = 0;
-        foreach ($id as $i){
+        foreach (explode(',', $ids) as $i){
             $leader = 0;
             $leader = 0;
             if ((string) $i == (string) $leader_id){
             if ((string) $i == (string) $leader_id){
                 $leader = 1;
                 $leader = 1;
@@ -204,7 +204,7 @@
             $statement->bindValue(':unit', $i, SQLITE3_INTEGER);
             $statement->bindValue(':unit', $i, SQLITE3_INTEGER);
             $statement->bindValue(':leader', $leader, SQLITE3_INTEGER);
             $statement->bindValue(':leader', $leader, SQLITE3_INTEGER);
             $statement->bindValue(':front', $front, SQLITE3_INTEGER);
             $statement->bindValue(':front', $front, SQLITE3_INTEGER);
-            $db->query($s);
+            $statement->execute();
             $j ++;
             $j ++;
         }
         }
         return 0;
         return 0;