[Skip to main content](#vessel-content)

#   1064 You have an error in your SQL syntax;

##

- **[hdouglas](/forum/user/30058-hdouglas "View hdouglas's Profile")**
- [![hdouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30058-hdouglas "View hdouglas's Profile") Topic Author
- [ Offline](/forum/user/30058-hdouglas)

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 11 months ago [\#224142](#224142) by [hdouglas](/forum/user/30058-hdouglas "View hdouglas's Profile")  *[1064 You have an error in your SQL syntax;](/forum/26-product-category-display/881092-1064-you-have-an-error-in-your-sql-syntax#224142 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 42.0 -- Error-message(debug-mod must be tuned on) -- : 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 ') ORDER BY warehouse&#95;name' at line 1 SQL=SELECT warehouse&#95;id, warehouse&#95;name FROM td4i8&#95;hikashop&#95;warehouse WHERE warehouse&#95;id IN () ORDER BY warehouse&#95;name  When trying to open a product in the backend the following error is reported.  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 ') ORDER BY warehouse&#95;name' at line 1 SQL=SELECT warehouse&#95;id, warehouse&#95;name FROM td4i8&#95;hikashop&#95;warehouse WHERE warehouse&#95;id IN () ORDER BY warehouse&#95;name  Debug is NOT showing the full SQL query, just the stack which tends to indicate a PHP error although there is no PHP error being reported in the error log.")* was created by *[hdouglas](/forum/user/30058-hdouglas "View hdouglas's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.6
-- PHP version -- : 5.4.45
-- Browser(s) name and version -- : Firefox 42.0
-- Error-message(debug-mod must be tuned on) -- : 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 ') ORDER BY warehouse_name' at line 1 SQL=SELECT warehouse_id, warehouse_name FROM td4i8_hikashop_warehouse WHERE warehouse_id IN () ORDER BY warehouse_name

When trying to open a product in the backend the following error is reported.

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 ') ORDER BY warehouse_name' at line 1 SQL=SELECT warehouse_id, warehouse_name FROM td4i8_hikashop_warehouse WHERE warehouse_id IN () ORDER BY warehouse_name

Debug is NOT showing the full SQL query, just the stack which tends to indicate a PHP error although there is no PHP error being reported in the error log.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODEwOTItMTA2NC15b3UtaGF2ZS1hbi1lcnJvci1pbi15b3VyLXNxbC1zeW50YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

10 years 11 months ago [\#224144](#224144) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[1064 You have an error in your SQL syntax;](/forum/26-product-category-display/881092-1064-you-have-an-error-in-your-sql-syntax#224144 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.6 -- PHP version -- : 5.4.45 -- Browser(s) name and version -- : Firefox 42.0 -- Error-message(debug-mod must be tuned on) -- : 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 ') ORDER BY warehouse&#95;name' at line 1 SQL=SELECT warehouse&#95;id, warehouse&#95;name FROM td4i8&#95;hikashop&#95;warehouse WHERE warehouse&#95;id IN () ORDER BY warehouse&#95;name  When trying to open a product in the backend the following error is reported.  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 ') ORDER BY warehouse&#95;name' at line 1 SQL=SELECT warehouse&#95;id, warehouse&#95;name FROM td4i8&#95;hikashop&#95;warehouse WHERE warehouse&#95;id IN () ORDER BY warehouse&#95;name  Debug is NOT showing the full SQL query, just the stack which tends to indicate a PHP error although there is no PHP error being reported in the error log.")*

Hi,

Change the code: Code:

$values = array_merge($values); JArrayHelper::toInteger($values); $query = 'SELECT warehouse_id, warehouse_name '. ' FROM ' . hikashop_table('warehouse') . ' WHERE warehouse_id IN ('.implode(',', $values).') '. ' ORDER BY warehouse_name';

to: Code:

JArrayHelper::toInteger($value); $query = 'SELECT warehouse_id, warehouse_name '. ' FROM ' . hikashop_table('warehouse') . ' WHERE warehouse_id IN ('.implode(',', $value).') '. ' ORDER BY warehouse_name';

in the file administrator/components/com_hikashop/classes/warehouse.php and that should fix the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODEwOTItMTA2NC15b3UtaGF2ZS1hbi1lcnJvci1pbi15b3VyLXNxbC1zeW50YXg/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
