Page 1 of 1
					
				Company Directory
				Posted: Fri Apr 25, 2008 9:29 am
				by johnmck
				I asked this question as part of the Company Directory module support thread but nobody replied.
how do can you sort the company category list alphabetically?
			 
			
					
				Re: Company Directory
				Posted: Fri Apr 25, 2008 9:46 am
				by johnmck
				ok I found out how to do it.
For future reference
public_html/modules/CompanyDirectory/action.category_list.php
change line 52
$query = "SELECT b.*,count(company_id) AS count FROM cms_module_compdir_company_categories a, cms_module_compdir_categories b WHERE b.id = a.category_id GROUP BY b.id";
to
$query = "SELECT b.*,count(company_id) AS count FROM cms_module_compdir_company_categories a, cms_module_compdir_categories b WHERE b.id = a.category_id GROUP BY b.name";
you are grouping by name and not id
 
			 
			
					
				Re: Company Directory
				Posted: Wed Jun 18, 2008 11:27 am
				by bfctradingpost
				thanks johnmck,
exactly what i was looking for, worked a treat.
cheers,
Patrick
ps. be sure to mark this post as [Solved] 

 
			 
			
					
				Re: Company Directory
				Posted: Wed Feb 04, 2009 10:15 pm
				by inyerface
				YES this was extremely helpful!!  I also recommend marking this [Solved]