Table mysql

Résolu/Fermé
ciranox 9 Messages postés 170 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 22 octobre 2014 - 18 juil. 2010 à 23:59
ciranox 9 Messages postés 170 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 22 octobre 2014 - 19 juil. 2010 à 15:15
Bonjour,

J'ai crée une table mysql , le problème est que elle ne marche pas.

Quelqu'un pourrait m'aider à la corriger ?

Voici la table :
CREATE TABLE 'membre' (
'id_membre' int(11) NOT NULL auto_increment,
'pseudo' varchar(50) COLLATE latin1_general_ci NOT NULL,
'nom' varchar(50) COLLATE latin1_general_ci NOT NULL,
'prenom' varchar(50 COLLATE latin1_general_ci NOT NULL,
'passe' varchar(20) COLLATE latin1_general_ci NOT NULL,
'statut' varchar(20) COLLATE latin1_general_ci NOT NULL default 'membre',
'email' varchar(50) COLLATE latin1_general_ci NOT NULL,
'autemail' char(3) COLLATE latin1_general_ci NOT NULL,
'sexe' varchar(20) COLLATE latin1_general_ci NOT NULL default '0',
'time' int(11) NOT NULL,
'ip' varchar(25) COLLATE latin1_general_ci NOT NULL,
'last_time' int(11) NOT NULL,
'online' int(2) NOT NULL,

PRIMARY KEY (id_membre)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1


CREATE TABLE 'admin' (

'id_admin' int(11) NOT NULL auto_increment,
'login' varchar(20) COLLATE latin1_general_ci NULL,
'password' varchar(8) COLLATE latin1_general_ci NULL,
) ENGINE = MYISAM ;


Merci d'avance.

( Il y a 2 jours j'avais posé ma question dans la section base de donnée , je la repose ici parce que personne ne me répond )

4 réponses

Profil bloqué
19 juil. 2010 à 00:48
La création marche, donc quel est le problème?
Si tu vois comme ca, tu poseras la bonne question et on pourras alors t'aide.
0
ciranox 9 Messages postés 170 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 22 octobre 2014 14
19 juil. 2010 à 00:58
Merci pour ta répondre,

voici l'erreur :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE latin1_general_ci NOT NULL, 'passe' varchar(20) COLLATE latin1_gener' at line 5
0
Leviathan49 Messages postés 257 Date d'inscription jeudi 10 juin 2010 Statut Membre Dernière intervention 22 juillet 2011 70
19 juil. 2010 à 10:42
'prenom' varchar(50 COLLATE latin1_general_ci NOT NULL,
la parenthèse du varchar(50) n'est pas fermée.
0
ciranox 9 Messages postés 170 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 22 octobre 2014 14
19 juil. 2010 à 15:15
Bonjour,

Effectivement il manquer )

ça marche pour la table membre . Pour la table admin, J'ai dû ajouter PRIMARY KEY(id_admin) pour que ça marche .

Merci.

Bonne journée.
0