diff --git a/build/database/core/PDOWrapper/PDOWrapper.php b/build/database/core/PDOWrapper/PDOWrapper.php index ffd5cb8..8d64b60 100644 --- a/build/database/core/PDOWrapper/PDOWrapper.php +++ b/build/database/core/PDOWrapper/PDOWrapper.php @@ -154,23 +154,19 @@ class PDOWrapper extends \PDO //find the given pattern in the request, then call our function and replace the matched string by the return value of our function $finalStatement .= rtrim(preg_replace_callback("/(:[a-z_\-0-9]*)/is",function($matches) use (&$i,&$tempParametes){ - //get next number - $i++; - //delete the ':' at the beginning of the string - $tempKey = ltrim($matches[0],':'); //copy the parameter with the modified index - $tempParametes[$tempKey.$i] = $tempParametes[$tempKey]; + $tempParametes[":$i"] = $tempParametes[$matches[0]]; //delete the old index - unset($tempParametes[$tempKey]); + unset($tempParametes[$matches[0]]); //return the modified string for replacement - return $matches[0].$i; + return ":".$i++; },$statement),';').';'; - $finalExecute = array_merge($finalExecute,$tempParametes); + $finalExecute += $tempParametes; } //disable stacking @@ -184,6 +180,7 @@ class PDOWrapper extends \PDO $req = $this->prepare($finalStatement); $success = $req->execute($finalExecute); + //as we execute multiple query that we don't fetch, we have to close the cursor if we want to do other requests later $req->closeCursor(); $this->commit(); diff --git a/build/database/repo/ue.php b/build/database/repo/ue.php index 6ec3f37..5f00462 100644 --- a/build/database/repo/ue.php +++ b/build/database/repo/ue.php @@ -195,9 +195,9 @@ class ue extends Repo_i { IFNULL(formlist.nbrCours,0) nbrCours, IFNULL(formlist.nbrTD,0) nbrTD, IFNULL(formlist.nbrTP,0) nbrTP, - IFNULL(formlist.modCours,1) modCours, - IFNULL(formlist.modTD,1) modTD, - IFNULL(formlist.modTP,1) modTP, + IFNULL(formlist.modCours,0) modCours, + IFNULL(formlist.modTD,0) modTD, + IFNULL(formlist.modTP,0) modTP, IFNULL(formlist.nbrProfCours,0) nbrProfCours, IFNULL(formlist.nbrProfTD,0) nbrProfTD, IFNULL(formlist.nbrProfTP,0) nbrProfTP diff --git a/webpack/component/home/page1.vue b/webpack/component/home/page1.vue index fe52b31..1b0c4cb 100644 --- a/webpack/component/home/page1.vue +++ b/webpack/component/home/page1.vue @@ -1,41 +1,42 @@