Erreur syntaxe requete sql
virus59300
Messages postés
66
Statut
Membre
-
freto Messages postés 1543 Date d'inscription Statut Membre Dernière intervention -
freto Messages postés 1543 Date d'inscription Statut Membre Dernière intervention -
Bonjour à toutes et à tous,
j'ai un petit problème de syntaxe dans une requête pouvez vous y jetter un petit oeil?
SELECT
`Products`.`id` AS `id`,
`ProductsCountries`.`new` AS `new`,
`ProductsCountries`.`availability_date` AS `availability_date`,
`ProductsI18N`.`title` AS `title`,
FROM
`Products`
INNER JOIN `ProductsCountries`
ON `Products`.`id` = `ProductsCountries`.`id_product`
INNER JOIN `ProductsI18N`
ON `Products`.`id` = `ProductsI18N`.`id_product`
WHERE
`ProductsCountries`.`id_country` = 'FR'
AND
`ProductsI18N`.`id_culture_code` = 'fr-FR'
voici l'erreur :
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 'FROM `Products` INNER JOIN `ProductsCountries` ON `Products`.`id` = `Pro' at line 6
merci
j'ai un petit problème de syntaxe dans une requête pouvez vous y jetter un petit oeil?
SELECT
`Products`.`id` AS `id`,
`ProductsCountries`.`new` AS `new`,
`ProductsCountries`.`availability_date` AS `availability_date`,
`ProductsI18N`.`title` AS `title`,
FROM
`Products`
INNER JOIN `ProductsCountries`
ON `Products`.`id` = `ProductsCountries`.`id_product`
INNER JOIN `ProductsI18N`
ON `Products`.`id` = `ProductsI18N`.`id_product`
WHERE
`ProductsCountries`.`id_country` = 'FR'
AND
`ProductsI18N`.`id_culture_code` = 'fr-FR'
voici l'erreur :
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 'FROM `Products` INNER JOIN `ProductsCountries` ON `Products`.`id` = `Pro' at line 6
merci
1 réponse
Bonjour.
Tu as simplement une virgule en trop juste avant le FROM.
Essaie donc comme ceci:
Tu as simplement une virgule en trop juste avant le FROM.
Essaie donc comme ceci:
SELECT `Products`.`id` AS `id`, `ProductsCountries`.`new` AS `new`, `ProductsCountries`.`availability_date` AS `availability_date`, `ProductsI18N`.`title` AS `title` FROM `Products` INNER JOIN `ProductsCountries` ON `Products`.`id` = `ProductsCountries`.`id_product` INNER JOIN `ProductsI18N` ON `Products`.`id` = `ProductsI18N`.`id_product` WHERE `ProductsCountries`.`id_country` = 'FR' AND `ProductsI18N`.`id_culture_code` = 'fr-FR'