Jump to content

Filter order by customer sql error


ylli

Recommended Posts

Hello i have a problem when i try to filter order by customer in the backend. this is the error i get : 
 

[PrestaShopDatabaseException]

Unknown column 'customer' in 'having clause'


SELECT COUNT(*) AS `tju_order` 
			FROM `tju_orders` a 
			
			
		LEFT JOIN `tju_customer` c ON (c.`id_customer` = a.`id_customer`)
		INNER JOIN `tju_address` address ON address.id_address = a.id_address_delivery
		INNER JOIN `tju_country` country ON address.id_country = country.id_country
		INNER JOIN `tju_country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = 1)
		LEFT JOIN `tju_order_state` os ON (os.`id_order_state` = a.`current_state`)
		LEFT JOIN `tju_order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = 1) 
			 WHERE 1  
			
			 HAVING `customer` LIKE '%ylli%' LIMIT 1

at line 765 in file classes/db/Db.php
760. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
761. 		}
762. 		elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
763. 		{
764. 			if ($sql)
765. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
766. 
767. 			throw new PrestaShopDatabaseException($this->getMsgError());
768. 		}
769. 	}
770. 
DbCore->displayError - [line 418 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 669 - classes/db/Db.php] - [1 Arguments]
DbCore->getRow - [line 698 - classes/db/Db.php] - [2 Arguments]
DbCore->getValue - [line 3198 - classes/controller/AdminController.php] - [2 Arguments]
AdminControllerCore->getList - [line 2287 - classes/controller/AdminController.php] - [1 Arguments]
AdminControllerCore->renderList - [line 435 - controllers/admin/AdminOrdersController.php]
AdminOrdersControllerCore->renderList - [line 2015 - classes/controller/AdminController.php]
AdminControllerCore->initContent - [line 180 - classes/controller/Controller.php]
ControllerCore->run - [line 373 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 54 - admin/index.php]

can anyone help me solve this. i am trying to find the query but i could not find it.

 

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...