erreur avec ma requete sql
Posté : 25 mars 2014, 23:45
Bonjour
Je rencontre un probleme avec ma requete sql. Lorsque je souhaite faire une recherche dans ma table villes_france j'obtiens un message d'erreur
le voici

SELECT * FROM `villes_france` WHERE `ville_nom_reel` LIKE '%NANCY%' ORDER BY `ville_nom_reel` DESC SETville_nom_reelutf8
LIMIT 0, 25
MySQL a répondu: Documentation
#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 'SETville_nom_reelutf8
LIMIT 0, 25' at line 1
avez-vous deja eu le probleme ?
J'ajoute que ma table villes_france a environ 36500 enregistrements j'ai egalement le probleme quand je je demande un affichage des enregistrements via phpmyadmin
voici la structure de la table
Je rencontre un probleme avec ma requete sql. Lorsque je souhaite faire une recherche dans ma table villes_france j'obtiens un message d'erreur
le voici

SELECT * FROM `villes_france` WHERE `ville_nom_reel` LIKE '%NANCY%' ORDER BY `ville_nom_reel` DESC SETville_nom_reelutf8
LIMIT 0, 25
MySQL a répondu: Documentation
#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 'SETville_nom_reelutf8
LIMIT 0, 25' at line 1
avez-vous deja eu le probleme ?
J'ajoute que ma table villes_france a environ 36500 enregistrements j'ai egalement le probleme quand je je demande un affichage des enregistrements via phpmyadmin
voici la structure de la table
CREATE TABLE IF NOT EXISTS `villes_france` (
`ville_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`ville_departement` varchar(3) DEFAULT NULL,
`ville_slug` varchar(255) DEFAULT NULL,
`ville_nom` varchar(45) DEFAULT NULL,
`ville_nom_reel` varchar(45) DEFAULT NULL,
`ville_nom_soundex` varchar(20) DEFAULT NULL,
`ville_nom_metaphone` varchar(22) DEFAULT NULL,
`ville_code_postal` varchar(255) DEFAULT NULL,
`ville_commune` varchar(3) DEFAULT NULL,
`ville_code_commune` varchar(5) NOT NULL,
`ville_arrondissement` smallint(3) unsigned DEFAULT NULL,
`ville_canton` varchar(4) DEFAULT NULL,
`ville_amdi` smallint(5) unsigned DEFAULT NULL,
`ville_population_2010` mediumint(11) unsigned DEFAULT NULL,
`ville_population_1999` mediumint(11) unsigned DEFAULT NULL,
`ville_population_2012` mediumint(10) unsigned DEFAULT NULL COMMENT 'approximatif',
`ville_densite_2010` int(11) DEFAULT NULL,
`ville_surface` mediumint(7) unsigned DEFAULT NULL,
`ville_longitude_deg` float DEFAULT NULL,
`ville_latitude_deg` float DEFAULT NULL,
`ville_longitude_grd` varchar(9) DEFAULT NULL,
`ville_latitude_grd` varchar(8) DEFAULT NULL,
`ville_longitude_dms` varchar(9) DEFAULT NULL,
`ville_latitude_dms` varchar(8) DEFAULT NULL,
`ville_zmin` mediumint(4) DEFAULT NULL,
`ville_zmax` mediumint(4) DEFAULT NULL,
`ville_population_2010_order_france` int(10) unsigned DEFAULT NULL,
`ville_densite_2010_order_france` int(10) unsigned DEFAULT NULL,
`ville_surface_order_france` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`ville_id`),
UNIQUE KEY `ville_slug` (`ville_slug`),
KEY `ville_departement` (`ville_departement`),
KEY `ville_nom` (`ville_nom`),
KEY `ville_nom_reel` (`ville_nom_reel`),
KEY `ville_code_commune` (`ville_code_commune`),
KEY `ville_code_postal` (`ville_code_postal`),
KEY `ville_longitude_latitude_deg` (`ville_longitude_deg`,`ville_latitude_deg`),
KEY `ville_nom_soundex` (`ville_nom_soundex`),
KEY `ville_nom_metaphone` (`ville_nom_metaphone`),
KEY `ville_population_2010` (`ville_population_2010`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=36569 ;
et une ligne (1, '01', 'ozan', 'OZAN', 'Ozan', 'O250', 'OSN', '01190', '284', '01284', 2, '26', 6, 618, 469, 500, 94, 660, 4.91667, 46.3833, '2866', '51546', '+45456', '462330', 170, 205, 14126, 8823, 26916),