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

#   \[SOLVED\] Error 1064 filter

##

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

Less More

- Posts: 117
- Thank you received: 3
-
-
- [](http://www.crealia.it)
-

12 years 3 weeks ago -  12 years 3 weeks ago [\#177567](#177567) by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")  *[\[SOLVED\] Error 1064 filter](/forum/45-filters-search/872683-solved-error-1064-filter#177567 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.34  Hi, we have an error 1064 when we try to use the a filter.  We have created 2 filters: cursor and checkbox  Cursor filter work on custom product text field and if activated alone it works fine. Then we have created another filter, checkbox that works on another custom product field, in this case a multi-checkbox field.  When we activate the checkbox filter, both filters are correctly displayed but as soon as I select a value in the checkbox filter and filtering I got this error:  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 b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ord' at line 1 SQL=SELECT DISTINCT b.&#42; FROM XXXXX&#95;hikashop&#95;product&#95;category AS a LEFT JOIN XXXXX&#95;hikashop&#95;product AS b ON a.product&#95;id=b.product&#95;id WHERE b.product&#95;published=1 AND b.product&#95;type = 'main' AND a.category&#95;id IN (12) AND (b.product&#95;access = 'all' OR b.product&#95;access LIKE '%,8,%') AND (b.test = '1' OR OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ordering ASC LIMIT 0, 20  What's the problem?")* was created by *[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.34

Hi, we have an error 1064 when we try to use the a filter.

We have created 2 filters: cursor and checkbox

Cursor filter work on custom product text field and if activated alone it works fine. Then we have created another filter, checkbox that works on another custom product field, in this case a multi-checkbox field.

When we activate the checkbox filter, both filters are correctly displayed but as soon as I select a value in the checkbox filter and filtering I got this error:

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 b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ord' at line 1 SQL=SELECT DISTINCT b.* FROM XXXXX_hikashop_product_category AS a LEFT JOIN XXXXX_hikashop_product AS b ON a.product_id=b.product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (12) AND (b.product_access = 'all' OR b.product_access LIKE '%,8,%') AND (b.test = '1' OR OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ordering ASC LIMIT 0, 20

What's the problem?

---

[ www.crealia.it/e-commerce/consulenza-ecommerce-hikashop](http://www.crealia.it/e-commerce/consulenza-ecommerce-hikashop)

Last edit: 12 years 3 weeks ago by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 weeks ago [\#177573](#177573) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Error 1064 filter](/forum/45-filters-search/872683-solved-error-1064-filter#177573 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.34  Hi, we have an error 1064 when we try to use the a filter.  We have created 2 filters: cursor and checkbox  Cursor filter work on custom product text field and if activated alone it works fine. Then we have created another filter, checkbox that works on another custom product field, in this case a multi-checkbox field.  When we activate the checkbox filter, both filters are correctly displayed but as soon as I select a value in the checkbox filter and filtering I got this error:  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 b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ord' at line 1 SQL=SELECT DISTINCT b.&#42; FROM XXXXX&#95;hikashop&#95;product&#95;category AS a LEFT JOIN XXXXX&#95;hikashop&#95;product AS b ON a.product&#95;id=b.product&#95;id WHERE b.product&#95;published=1 AND b.product&#95;type = 'main' AND a.category&#95;id IN (12) AND (b.product&#95;access = 'all' OR b.product&#95;access LIKE '%,8,%') AND (b.test = '1' OR OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ordering ASC LIMIT 0, 20  What's the problem?")*

Hi,

Please edit the file "administrator/components/com_hikashop/classes/filter.php" and remplace Code:

$fieldsList[] = 'b.'.$filter-&gt;filter_options['custom_field'].' = '.$database-&gt;Quote($field).' OR ';

By Code:

$fieldsList[] = 'b.'.$filter-&gt;filter_options['custom_field'].' = '.$database-&gt;Quote($field);

We will fix the HikaShop package as soon as possible.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [webconcept](/forum/user/30332-webconcept "View webconcept's Profile")

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

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

Less More

- Posts: 117
- Thank you received: 3
-
-
- [](http://www.crealia.it)
-

12 years 3 weeks ago [\#177594](#177594) by [crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")  Replied by *[crealiagroup](/forum/user/30083-crealiagroup "View crealiagroup's Profile")* on topic *[Error 1064 filter](/forum/45-filters-search/872683-solved-error-1064-filter#177594 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.34  Hi, we have an error 1064 when we try to use the a filter.  We have created 2 filters: cursor and checkbox  Cursor filter work on custom product text field and if activated alone it works fine. Then we have created another filter, checkbox that works on another custom product field, in this case a multi-checkbox field.  When we activate the checkbox filter, both filters are correctly displayed but as soon as I select a value in the checkbox filter and filtering I got this error:  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 b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ord' at line 1 SQL=SELECT DISTINCT b.&#42; FROM XXXXX&#95;hikashop&#95;product&#95;category AS a LEFT JOIN XXXXX&#95;hikashop&#95;product AS b ON a.product&#95;id=b.product&#95;id WHERE b.product&#95;published=1 AND b.product&#95;type = 'main' AND a.category&#95;id IN (12) AND (b.product&#95;access = 'all' OR b.product&#95;access LIKE '%,8,%') AND (b.test = '1' OR OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ordering ASC LIMIT 0, 20  What's the problem?")*

Thanks Jerome, solved!

---

[ www.crealia.it/e-commerce/consulenza-ecommerce-hikashop](http://www.crealia.it/e-commerce/consulenza-ecommerce-hikashop)

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

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