Bonjour
J'ai cette erreur dans cette création et je ne trouve pas pourquoi (ça marche en interne et pas sur le serveur externe ??)

Erreur sql :Création table collecYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( id int(6) NOT NULL auto_increment, yvert text NOT NULL, neuf int(4) NOT NULL, ' at line 1

version de mysql sur le serveur externe : mysql 5.1.73-1+deb6u1

($nomcollec est bien connu)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
		$sql='CREATE TABLE '.$nomcollec.' ( id int(6) NOT NULL auto_increment, yvert text NOT NULL, neuf int(4) NOT NULL, valneuf decimal(10,2) NOT NULL, dateaquineuf text NOT NULL, oblit int(4) NOT NULL, valoblit decimal(10,2) NOT NULL, dateaquioblit text NOT NULL, neufchar int(4) NOT NULL, valneufchar decimal(10,2) NOT NULL, dateaquineufchar text NOT NULL, photo text NOT NULL, info text NOT NULL, desig text NOT NULL, annee text NOT NULL, chemin text NOT NULL, numero text NOT NULL, type text NOT NULL, cote int(6) NOT NULL, graveur text NOT NULL, dessin text NOT NULL, couleur text NOT NULL, dentelure text NOT NULL, faciale text NOT NULL, retrait text NOT NULL, prixneuf decimal(10,2) NOT NULL, prixchar decimal(10,2) NOT NULL, prixoblit decimal(10,2) NOT NULL, impression text NOT NULL, qtemis text NOT NULL, annee_cote text NOT NULL, date datetime NOT NULL, lib14 text NOT NULL, lib15 text NOT NULL, lib16 text NOT NULL, lib17 text NOT NULL, lib18 text NOT NULL, PRIMARY KEY  (id) )DEFAULT CHARSET=utf8'; 
 
		mysqli_query($base_collec,$sql)  or die ('Erreur sql :Création table collec'.mysqli_error($base_collec));
Merci de vous pencher sur mon problème