Bonjour,
J'ai une erreur sur la requête SQL suivante (avec sous-requête) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 SELECT reference AS 'Product code', 'BeastyBike' AS 'Vendor', GROUP_CONCAT(name ORDER BY name ASC SEPARATOR '; ') AS 'Options', 'Y' AS 'Inventory tracking', 'P' AS 'Options type' FROM ( SELECT p.reference, CONCAT(agl.name, ': S[', GROUP_CONCAT(DISTINCT REPLACE(al.name, ',', '.') ORDER BY al.name ASC SEPARATOR ', '), ']') AS 'name' FROM ps_product p LEFT JOIN ps_product_lang pl ON pl.id_product = p.id_product LEFT JOIN ps_product_attribute pa ON pa.id_product = p.id_product LEFT JOIN ps_product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute LEFT JOIN ps_attribute a ON a.id_attribute = pac.id_attribute LEFT JOIN ps_attribute_lang al ON al.id_attribute = a.id_attribute LEFT JOIN ps_attribute_group ag ON ag.id_attribute_group = a.id_attribute_group LEFT JOIN ps_attribute_group_lang agl ON agl.id_attribute_group = ag.id_attribute_group LEFT JOIN ps_category c ON c.id_category = p.id_category_default WHERE p.active = 1 AND p.reference != '' AND pl.id_lang = 2 AND pl.id_shop = 1 AND al.id_lang = 2 AND agl.id_lang = 2 AND c.id_category != 1 AND c.id_category != 19 AND c.id_category != 104 AND c.id_category != 105 GROUP BY p.reference, agl.name ) product GROUP BY reference ORDER BY reference
Cette requête d'export fonctionnait très bien, ainsi que l'export des résultats, jusqu'à ce que je mette à jour Plesk.
Elle fonctionne toujours, car j'arrive à afficher les résultats, mais j'ai les erreurs suivantes :
Et lorsque j'essaye d'exporter les résultats en csv, il me retourne un fichier d'erreur contenant :ligne 2 :
Une expression était attendue. ( près de ( )
Jeton inattendu ( près de ( )
ligne 3 :
Ce type de clause a été analysé précédemment. (près de SELECT)
Version MySQL 5.1.73<div class="error"><h1>Erreur</h1><p><strong>Analyse statique :</strong></p><p>1 erreurs trouvées lors de l'analyse.</p><p><ol><li>Une expression était attendue. (near "" at position 0)</li></ol></p><p><strong>Requête SQL : </strong>
<a href="./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Fselect.html" target="mysql_doc"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a><a href="tbl_sql.php?sql_query=SELECT+reference+AS+%27Product+code%27%2C+%27BeastyBike%27+AS+%27Vendor%27%2C+GROUP_CONCAT%28name+ORDER+BY+name+ASC+SEPARATOR+%27%3B+%27%29+AS+%27Features%27+FROM&show_query=1&db=beastybikeps16&table=product&token=7f19f473809ba3a776878e5a82a2647c"><span class="nowrap"><img src="themes/dot.gif" title="Modifier" alt="Modifier" class="icon ic_b_edit" /> Modifier</span></a> </p>
<p>
SELECT reference AS 'Product code', 'BeastyBike' AS 'Vendor', GROUP_CONCAT(name ORDER BY name ASC SEPARATOR '; ') AS 'Features' FROM
</p>
<p>
<strong>MySQL a répondu: </strong><a href="./url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Ferror-messages-server.html" target="mysql_doc"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>
</p>
<code>#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 '' at line 1</code><br/></div>
Version phpMyAdmin 4.5.1
Je n'ai trouvé aucune information nulle part sur ce type d'erreurs.
Merci d'avance pour votre aide.
Partager