1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
$hote="localhost";
$utilisateur="root";
$modpasse="6121970";
$connection=mysql_connect ($hote, $utilisateur, $modpasse)
or die("connection ne fonctionne pas");
echo $connection;
$nomdelabase="labase";
mysql_select_db ($nomdelabase, $connection);
$sql=mysql_query(CREATE TABLE `pourceaux` (
`titre` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
`annee` TINYINT NOT NULL,
`nomMes` VARCHAR(30) NOT NULL,
`prenomMES` VARCHAR(30) NOT NULL,
PRIMARY KEY (`titre`));
);
echo $sql;
[i]// sa me renvoie cette erreur :
// Parse error: syntax error, unexpected T_STRING in //C:\apachefriends\xampp\htdocs\www\creation_db.php on line 19
// la ligne 19 correspond à execute=mysql_query.....[/i] |
Partager