Application Error

Mysqli prepare error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'partyfun_db.categories_tbl.cat_name' which is not in SELECT list; this is incompatible with DISTINCT#0 /home2/partyfun/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT DISTINCT...') #1 /home2/partyfun/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT DISTINCT...') #2 /home2/partyfun/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('SELECT DISTINCT...') #3 /home2/partyfun/library/Zend/Db/Adapter/Abstract.php(736): Zend_Db_Adapter_Abstract->query('SELECT DISTINCT...', Array) #4 /home2/partyfun/application/default/models/Data.php(0): Zend_Db_Adapter_Abstract->fetchAll() #5 /home2/partyfun/application/default/controllers/SitemapController.php(0): Data->getVendorIdsByCatIds() #6 /home2/partyfun/library/Zend/Controller/Action.php(516): SitemapController->vendorSitemapAction() #7 /home2/partyfun/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('vendorSitemapAc...') #8 /home2/partyfun/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #9 /home2/partyfun/library/Zend/Controller/Front.php(212): Zend_Controller_Front->dispatch() #10 /home2/partyfun/application/bootstrap.php(0): Zend_Controller_Front::run() #11 /home2/partyfun/public_html/index.php(0): unknown() #12 {main}