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

#   Mysql problem

##

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago [\#9789](#9789) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  *[Mysql problem](/forum/3-bug-report/9789-mysql-problem#9789 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")* was created by *[gessner](/forum/user/1370-gessner "View gessner's Profile")*

hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB
No valid database connection: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 price_value DESC' at line 1 SQL=SELECT * FROM jos_hikashop_price WHERE price_currency_id IN (3) AND price_product_id IN () ORDER BY price_value DESC

huiiii...whats happen?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85Nzg5LW15c3FsLXByb2JsZW0/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 8 months ago [\#9804](#9804) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9804 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

Do you use the latest version of HikaShop ? I recall that there was such problem in a previous version so if you don't have the latest version I would recommend you to update.
If you have the latest version and still have the problem, could you do a screenshot of the full error page ?

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

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago [\#9806](#9806) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  Replied by *[gessner](/forum/user/1370-gessner "View gessner's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9806 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

Hi, i did the download today...i guess it is the last version...
[ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/mysql_err.jpg) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/mysql_err.jpg "&#91;img")

- [ ![mysql&#95;err.jpg](/forum/attachment/633) ](/forum/attachment/633 "mysql&#95;err.jpg") [ ](/forum/attachment/633?download=1 "mysql&#95;err.jpg")

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

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago [\#9807](#9807) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  Replied by *[gessner](/forum/user/1370-gessner "View gessner's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9807 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

sorry, here is it in english  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/mysql_err_en.jpg) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/mysql_err_en.jpg "&#91;img")

- [ ![mysql&#95;err&#95;en.jpg](/forum/attachment/634) ](/forum/attachment/634 "mysql&#95;err&#95;en.jpg") [ ](/forum/attachment/634?download=1 "mysql&#95;err&#95;en.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85Nzg5LW15c3FsLXByb2JsZW0/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 8 months ago -  15 years 8 months ago [\#9809](#9809) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9809 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

In the file administrator/components/com_hikashop/classes/currency.php in the function getPrices, if you replace the line:
$filters[]= 'price_product_id IN ('.$ids_string.')';

by:
if(!empty($ids_string)){
$filters[]= 'price_product_id IN ('.$ids_string.')';
}

that should solve the problem.

Last edit: 15 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago [\#9811](#9811) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  Replied by *[gessner](/forum/user/1370-gessner "View gessner's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9811 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

i did that:
function getPrices(&amp;$element,&amp;$ids,$currency_id,$main_currency,$zone_id,$discount_before_tax){
$currency_ids = array($currency_id=&gt;$currency_id,$main_currency=&gt;$main_currency);
$filters=array('price_currency_id IN ('.implode(',',$this-&gt;publishedCurrencies()).')');
if(!empty($ids)){
$ids_string = '';
foreach($ids as $id){
if(!empty($id)) $ids_string.= (int)$id.',';
}
$ids_string=rtrim($ids_string,',');
if(!empty($ids_string)){
$filters[]= 'price_product_id IN ('.$ids_string.')';
}

and the new error wondow shos up like that:

500 - No valid database connection: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 discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_fla' at line 1 SQL=SELECT * FROM jos_hikashop_discount WHERE discount_type='discount' AND discount_published=1 AND ( discount_quota&gt;discount_used_times OR discount_quota=0 ) AND discount_start &lt; 1299064287 AND ( discount_end &gt; 1299064287 OR discount_end = 0 ) AND ( discount_product_id IN () OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_flat_amount!=0 OR discount_percent_amount!=0 )

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

No valid database connection: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 discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_fla' at line 1 SQL=SELECT * FROM jos_hikashop_discount WHERE discount_type='discount' AND discount_published=1 AND ( discount_quota&gt;discount_used_times OR discount_quota=0 ) AND discount_start &lt; 1299064287 AND ( discount_end &gt; 1299064287 OR discount_end = 0 ) AND ( discount_product_id IN () OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_flat_amount!=0 OR discount_percent_amount!=0 )

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85Nzg5LW15c3FsLXByb2JsZW0/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 8 months ago [\#9813](#9813) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9813 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

Ok, so instead of that modification, let's do this one:

change the line:
$filters[]= 'price_product_id IN ('.$ids_string.')';

to:

if(empty($ids_string)){
if(!empty($element-&gt;product_id)){
$ids_string = $element-&gt;product_id;
$ids = array($ids_string);
}else{
return false;
}
}
$filters[]= 'price_product_id IN ('.$ids_string.')';

in the same place.

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

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago -  15 years 8 months ago [\#9820](#9820) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  Replied by *[gessner](/forum/user/1370-gessner "View gessner's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9820 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

thank you very much!
kool - it works...i will go out the studio now...its late here (japan)..but tomorrow i will give you software more time...i am happy until here... i am working on two eng/jap onlinestores for the japanese market...and i did test a lot of joomla shops last week...it was very frustrating...nothing works realy... and if u need multilingual u r really f...t! so anyway i have one question, because i am thinking to buy HIKA...: **will i be able to translate my content with the commercial version..like all the productnames and descriptions and so on?**
thanks.a

Last edit: 15 years 8 months ago by [gessner](/forum/user/1370-gessner "View gessner's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85Nzg5LW15c3FsLXByb2JsZW0/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 8 months ago [\#9825](#9825) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9825 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

If you have joomla 1.5, you will be able to do that with our integration with JoomFish (you can test it on our demo website). However, JoomFish is not yet ported to joomla 1.6 so it won't be possible if your website is on joomla 1.6

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

- **[gessner](/forum/user/1370-gessner "View gessner's Profile")**
- [![gessner's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1370.jpg)](/forum/user/1370-gessner "View gessner's Profile") Topic Author
- [ Offline](/forum/user/1370-gessner)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 8 months ago [\#9826](#9826) by [gessner](/forum/user/1370-gessner "View gessner's Profile")  Replied by *[gessner](/forum/user/1370-gessner "View gessner's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9826 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

wow kool...yeah and 1.6 needs to wait...there is no much stuff on the market at this time for 1.6..![;-)](/media/kunena/emoticons/24.png ";-)")
so i guess u do it with content element xml for joomfish...that's a smart step...i was also positive shocked about your japanese translation...and that i can touch every file with translation manager and do my own stuff....its great...
PS your demo site needs a little bit more love! ![;-)](/media/kunena/emoticons/24.png ";-)")
take care and thanks again! a.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85Nzg5LW15c3FsLXByb2JsZW0/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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 8 months ago [\#9829](#9829) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Mysql problem](/forum/3-bug-report/9789-mysql-problem#9829 "hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB No valid database connection: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 price&#95;value DESC' at line 1 SQL=SELECT &#42; FROM jos&#95;hikashop&#95;price WHERE price&#95;currency&#95;id IN (3) AND price&#95;product&#95;id IN () ORDER BY price&#95;value DESC  huiiii...whats happen?")*

Yes, We'll have to look at the design of our demo website in the future ![:)](/media/kunena/emoticons/3.png ":)")

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

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