| @@ 41-48 (lines=8) @@ | ||
| 38 | * function qui fait la connexion a la bdd ne peu etre appelee que dans la classe |
|
| 39 | * @return PDO |
|
| 40 | */ |
|
| 41 | private function getPdo() {
|
|
| 42 | if ($this->dbc === null) {
|
|
| 43 | $dbc = new PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass); |
|
| 44 | $dbc->exec("set names utf8");
|
|
| 45 | $this->dbc = $dbc; |
|
| 46 | } |
|
| 47 | return $this->dbc; |
|
| 48 | } |
|
| 49 | //-------------------------- FIN GETTER ----------------------------------------------------------------------------// |
|
| 50 | ||
| 51 | //-------------------------- FUNCTION QUI FONT DES REQUETES SUR LA BDD --------------------------------------------// |
|
| @@ 34-41 (lines=8) @@ | ||
| 31 | * function qui fait la connexion a la bdd ne peu etre appelee que dans la classe |
|
| 32 | * @return PDO |
|
| 33 | */ |
|
| 34 | private function getPdo() {
|
|
| 35 | if ($this->dbc === null) {
|
|
| 36 | $dbc = new PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass); |
|
| 37 | $dbc->exec("set names utf8");
|
|
| 38 | $this->dbc = $dbc; |
|
| 39 | } |
|
| 40 | return $this->dbc; |
|
| 41 | } |
|
| 42 | //-------------------------- FIN GETTER ----------------------------------------------------------------------------// |
|
| 43 | ||
| 44 | //-------------------------- FUNCTION QUI FONT DES REQUETES SUR LA BDD --------------------------------------------// |
|