- Posts: 57
- Thank you received: 0
Error: 1064 when click serial button in frontend
10 years 6 months ago - 10 years 6 months ago #234002
by skyfranky
Error: 1064 when click serial button in frontend was created by skyfranky
-- HikaShop version -- : latest
-- HikaMarket version -- : latest
Error: 1064 when click serial button in frontend
screencast.com/t/sqWUwK9g2E
Error: 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 ') OR (serial.serial_pack_id IN (1) AND hk_order.order_type = 'subsale' AND hk_or' at line 1 SQL=SELECT COUNT(serial.serial_id) as count, serial.serial_pack_id, serial.serial_status FROM jos_hikaserial_serial AS serial LEFT JOIN jos_hikashop_order AS hk_order ON (serial.serial_order_id > 0 AND serial.serial_order_id = hk_order.order_parent_id) WHERE serial.serial_pack_id IN () OR (serial.serial_pack_id IN (1) AND hk_order.order_type = 'subsale' AND hk_order.order_vendor_id = 2) GROUP BY serial.serial_pack_id, serial.serial_status;
PHP Version 5.5.33
joomla 3.4
mysql 5.5.32
-- HikaMarket version -- : latest
Error: 1064 when click serial button in frontend
screencast.com/t/sqWUwK9g2E
Error: 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 ') OR (serial.serial_pack_id IN (1) AND hk_order.order_type = 'subsale' AND hk_or' at line 1 SQL=SELECT COUNT(serial.serial_id) as count, serial.serial_pack_id, serial.serial_status FROM jos_hikaserial_serial AS serial LEFT JOIN jos_hikashop_order AS hk_order ON (serial.serial_order_id > 0 AND serial.serial_order_id = hk_order.order_parent_id) WHERE serial.serial_pack_id IN () OR (serial.serial_pack_id IN (1) AND hk_order.order_type = 'subsale' AND hk_order.order_vendor_id = 2) GROUP BY serial.serial_pack_id, serial.serial_status;
PHP Version 5.5.33
joomla 3.4
mysql 5.5.32
Last edit: 10 years 6 months ago by skyfranky.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234021
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Error: 1064 when click serial button in frontend
Hi,
Thanks for the report.
It looks like the user do not have any pack and it generates that SQL error.
The easier would be to edit the file "components/com_hikaserials/views/serialsmarket/view.html.php"
And to replace
By
It would avoid the SQL issue.
I will improve the patch in order to display a message to the user instead of displaying an "empty" page.
Regards,
Thanks for the report.
It looks like the user do not have any pack and it generates that SQL error.
The easier would be to edit the file "components/com_hikaserials/views/serialsmarket/view.html.php"
And to replace
Code:
if($target_vendor_id == 0) {
$query = 'SELECT COUNT(serial.serial_id) as count, serial.serial_pack_id, serial.serial_status FROM '.hikaserial::table('serial').' AS serial '.
' WHERE serial.serial_pack_id IN ('.implode(',', $pack_ids).') '.
' GROUP BY serial.serial_pack_id, serial.serial_status;';
} else {
Code:
if($target_vendor_id == 0) {
$query = 'SELECT COUNT(serial.serial_id) as count, serial.serial_pack_id, serial.serial_status FROM '.hikaserial::table('serial').' AS serial '.
' WHERE serial.serial_pack_id IN ('.implode(',', $pack_ids).') '.
' GROUP BY serial.serial_pack_id, serial.serial_status;';
} else {
if(empty($own_packs))
$own_packs = array(0);
I will improve the patch in order to display a message to the user instead of displaying an "empty" page.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
10 years 6 months ago #234042
by skyfranky
Replied by skyfranky on topic Error: 1064 when click serial button in frontend
fix works, thanks
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.199 seconds