- Posts: 4
- Thank you received: 0
1064 You have an error in your SQL syntax;
10 years 9 months ago #224142
by hdouglas
1064 You have an error in your SQL syntax; was created by hdouglas
-- 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.
-- 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 or Create an account to join the conversation.
10 years 9 months ago #224144
by nicolas
Replied by nicolas on topic 1064 You have an error in your SQL syntax;
Hi,
Change the code:
to:
in the file administrator/components/com_hikashop/classes/warehouse.php and that should fix the problem.
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';
Code:
JArrayHelper::toInteger($value);
$query = 'SELECT warehouse_id, warehouse_name '.
' FROM ' . hikashop_table('warehouse') .
' WHERE warehouse_id IN ('.implode(',', $value).') '.
' ORDER BY warehouse_name';
Please Log in or Create an account to join the conversation.
Time to create page: 0.170 seconds