krypt Posted September 18, 2021 Share Posted September 18, 2021 (edited) Goodmorning everyone, I'm new to the forum and to using prestashop. I don't know if it's the right section to ask. I made a query to extract data with SELECT joined together with the UNION ALL. I tested it in the Back Office, in Database-> SQL Manager. When I save the query I get the message "SELECT does not exist". If I use a UNION instead of UNION ALL, it works. The curious thing is that the same query tested directly by phpmyadmin works. Have you ever understood such a thing? I did a counter test even with a more "simple" query and the result is always the same: with UNION ALL error, with UNION it works. This is the code of the "simple" and also bizarre test, but I just needed to understand. SELECT orderId, orderReference FROM (SELECT o.`id_order` AS `orderId`, o.`reference` AS `orderReference` FROM `ps_orders` o WHERE o.`reference` IN (210460,210267,210423,210405,210446) ) AS orderDat UNION ALL SELECT orderId, orderReference FROM (SELECT '***' AS `orderId`, o.`reference` AS `orderReference` FROM `ps_orders` o WHERE o.`reference` IN (210460,210267,210423,210405,210446) ) AS discountDat Thank you very much! Edited September 18, 2021 by krypt (see edit history) Link to comment Share on other sites More sharing options...
TheCHE Posted January 27, 2023 Share Posted January 27, 2023 Same problem here. Did you find any reason why this can be happening? How did you solve it? Thank you mate. Link to comment Share on other sites More sharing options...
ps8modules Posted February 2, 2023 Share Posted February 2, 2023 SQL Manager does not support such commands. It only supports SELECT once. https://docs.prestashop-project.org/1.7-documentation/user-guide/configuring-shop/advanced-parameters/database/sql-manager 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now