Source : lesson_13_a1_create_password_table.php |
Résultat |
<?php require ("../mysql_connexion/mysql_connexion.php"); require ("../commons/functions.php"); //mysql_select_db($db) ; $tableName = "atelierphp_sol_pass_words" ; (mySQLtable_exist($tableName)) ? drop_table($tableName) : print (""); $result = mysqli_query($mysqli,"CREATE TABLE $tableName (PASS_WORD_USER CHAR(9) NOT NULL, PASS_WORD_PASS TEXT, PASS_WORD_EXPIRATION_DATE DOUBLE, PRIMARY KEY (PASS_WORD_USER))"); if ($result == 1) { echo "table $tableName created<br/>"; } else { echo "error creating the table $tableName<br/>"; } ?> <p> <a href="../commons/show_solutions.php?exercise= lesson_13_a2_add_in_password_table.php"> Ajout d'utilisateurs à la table des mots de passe</a><br/>
|
La table existait déjà Efface table atelierphp_sol_pass_words Table effacée table atelierphp_sol_pass_words created
Ajout d'utilisateurs à la table des mots de passe
|