Jump to content

Bad SQL query Column 'zone' in order clause is ambiguous


Recommended Posts

Whe I try to go into Countries I get the above message. I had try to sort countries. I got the message and since I cannot go back to countries.

 

PrestaShop version: 1.6.0.5

 

This is what the Error reporting gave me:

 

Column 'zone' in order clause is ambiguous
 
 
SELECT SQL_CALC_FOUND_ROWS
a.`id_country`,b.name as name,`iso_code`,`call_prefix`,z.id_zone as zone,a.active as active
, z.`name` AS zone
FROM `ps_country` a
LEFT JOIN `ps_country_lang` b ON (b.`id_country` = a.`id_country` AND b.`id_lang` = 1)
LEFT JOIN `ps_zone` z ON (z.`id_zone` = a.`id_zone`) 
 
WHERE 1 
 
 
ORDER BY `zone` desc LIMIT 0,50
 
at line 623 in file classes/db/Db.php
617. WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
618. }
619. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
620. {
621. if ($sql)
622. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
623. throw new PrestaShopDatabaseException($this->getMsgError());
624. }
625. }
626. 

 

627. /**
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...