Voici mon code :
public function connectDataBase(){
$mysqli=new mysqli('localhost','root','','weather');
$mysqli->set_charset("utf8");
if($mysqli->connect_errno){
printf("Echec de la connexion:%s/n",$mysqli->connect_error);
exit();
}
}
public function createTable($city){
$this->connectDataBase();
$sqli=CREATE TABLE IF NOT EXISTS $city
(
id INT(12) PRIMARY KEY NOT NULL AUTO_INCREMENT,
period VARCHAR(15),
temp_mini INT (11),
temp_maxi INT(11),
comment TEXT(140)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
}
Tout fonctionne jusqu'a $this->connectDataBase();... mais en suite ma table ne veut pas se créer...Si quelqu'un pourrait m'aider...
D'avance merci...