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

#   Strange SQL error in mass actions

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 1 month ago [\#215683](#215683) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#215683 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.6.5
-- Joomla version -- : 3.4.3

I get this error in mass action:

> An error has occurred.
> 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 product\_parent\_id IN ()) LIMIT 0, 500' at line 1 SQL=SELECT hk\_product.\* FROM tpjtx\_hikashop\_product as hk\_product WHERE (product\_id IN () OR product\_parent\_id IN ()) LIMIT 0, 500

This is when I filter products with category_parent_id = 14. If the value is 13 there is no problem.

I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.

[ ![Captura&#95;de&#95;pantalla&#95;2015-09-29&#95;a&#95;les&#95;19&#95;06&#95;23.png](/forum/attachment/26740) ](/forum/attachment/26740 "...s&#95;19&#95;06&#95;23.png")

- [ ![Captura&#95;de&#95;pantalla&#95;2015-09-29&#95;a&#95;les&#95;19&#95;06&#95;23.png](/forum/attachment/26740) ](/forum/attachment/26740 "...s&#95;19&#95;06&#95;23.png") [ ](/forum/attachment/26740?download=1 "...s&#95;19&#95;06&#95;23.png")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#215714](#215714) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#215714 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

Hi,

I added a little fix on our end to avoid this error. But it is displayed because there is no products returned by this filter.
Are you sure that you want to filter on "category_parent_id" and not just "category_id" ?

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

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 1 month ago [\#215722](#215722) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#215722 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

Hi,
about your question:

I want to reach all products under a certain MAIN_A category even if they are not directly in that category but under a child category of MAIN_A.

MAIN_A has several subcategories.

Isn't category_parent_id the right way to point al MAIN_A subelements at any sub-level deep?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago -  11 years 1 month ago [\#215787](#215787) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#215787 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

Hi,

Yes it is indeed the right way, I just tried on my end and it seems to be working as expected.
Please install this latest version of the plugin:
*This attachment is hidden for guests.
Please log in or register to see it.*

My structure is:
Shoes (id 12)
- Men (id 13)
-Women (id 14)

So to get all the products under the "Shoes" category, I set the filter like you but with the id "12" in my case.

Last edit: 11 years 1 month ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

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

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 1 month ago [\#216170](#216170) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#216170 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

Hi,

after the update I'm afraid the system works still unpredictable (to me).

Now no matter what category I put it always counts None or 1 results even I product has tenths of them. Also tried with other operators like "Doesn't contain"...

I simply uploaded your attached package and the installation process was successful.

[ ![Captura&#95;de&#95;pantalla&#95;2015-10-03&#95;a&#95;les&#95;15&#95;28&#95;55.png](/forum/attachment/26831) ](/forum/attachment/26831 "...s&#95;15&#95;28&#95;55.png")

- [ ![Captura&#95;de&#95;pantalla&#95;2015-10-03&#95;a&#95;les&#95;15&#95;28&#95;55.png](/forum/attachment/26831) ](/forum/attachment/26831 "...s&#95;15&#95;28&#95;55.png") [ ](/forum/attachment/26831?download=1 "...s&#95;15&#95;28&#95;55.png")

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

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

11 years 1 month ago [\#216171](#216171) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#216171 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

I have some extra data that might be of use for you to determine the problem in mass actions (as long as I think it is a malfunction and not a wrong understanding in my side)

If you want an online version to check please request it and I'll put in a matter of minutes or hours.

[ ![SQL-MASS-action-likely-contradiction.png](/forum/attachment/26832) ](/forum/attachment/26832 "...tradiction.png")

- [ ![SQL-MASS-action-likely-contradiction.png](/forum/attachment/26832) ](/forum/attachment/26832 "...tradiction.png") [ ](/forum/attachment/26832?download=1 "...tradiction.png")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#216257](#216257) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Strange SQL error in mass actions](/forum/3-bug-report/879539-strange-sql-error-in-mass-actions#216257 "-- HikaShop version -- : 2.6.5 -- Joomla version -- : 3.4.3  I get this error in mass action:  This is when I filter products with category&#95;parent&#95;id = 14. If the value is 13 there is no problem.  I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.")*

Hi,

Yes please provide a backend and FTP access via our contact form.
Don't forget to give the url of that topic in the message.

Do you have the latest version of HikaShop ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84Nzk1Mzktc3RyYW5nZS1zcWwtZXJyb3ItaW4tbWFzcy1hY3Rpb25zP3RtcGw9bWFya2Rvd24=) 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.093 seconds

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