Jump to content

MySQL error when trying to see customer`s details


Recommended Posts

Hi all!


I hope you can help me with my problem. This came out of nowhere. this morning everything went fine as I did some testing with ordering and account creation front and back office. Didn`t change any files or settings..Here is the error I get when trying to acces a members details



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 'LIMIT 1' at line 1

select conversion_rate from ps_currency where id_currency =  LIMIT 1

at line 639 in file classes/db/Db.php

634. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);635. 		}636. 		elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))637. 		{638. 			if ($sql)639. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');640. 			throw new PrestaShopDatabaseException($this->getMsgError());641. 		}642. 	}643. 644. 	/**


Hope that you can help me. Running prestashop on


Server version Apache

PHP version 5.3.24

Memory limit 128M

Execution time 30





Link to comment
Share on other sites

Hmm, have you:


1) Changed anything about your currencies?

2) Added an address with a different country, and is this country restricted to use the 'currently used' currency?

3) Do you do some conversion of default currency to another currency?


The SQL 'forgets' to add the currency ID (like :

select conversion_rate from ps_currency where id_currency = 1 LIMIT 1


Please double check your currencies if all fields are filled out.

My 2 cents,
Link to comment
Share on other sites

Hi and thank you for the response.


I did not change anything in currecy. All I have is one currency installed since the begginig. Could it have anything to have with an carrier module? Cause that is all I modified lately that could have anything to do with currency. Although it does not say anything about that module in the error. :unsure:

Link to comment
Share on other sites

The 3rd party module "fancourier" is causing the issue.

Please liaise with the developpers to figure out why such happened and get them to fix the issue.


Apparently their function getShippingCost() is wrongly getting the id_currency


You were right. They fixed it today apparently. Ty!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...