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?
Company Directory
Company Directory
Last edited by johnmck on Fri Apr 25, 2008 9:48 am, edited 1 time in total.
Re: Company Directory
ok I found out how to do it.
For future reference
public_html/modules/CompanyDirectory/action.category_list.php
change line 52
For future reference
public_html/modules/CompanyDirectory/action.category_list.php
change line 52
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.id";
you are grouping by name and not id$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";
Last edited by johnmck on Fri Apr 25, 2008 9:48 am, edited 1 time in total.
-
- New Member
- Posts: 9
- Joined: Thu May 08, 2008 7:05 am
Re: Company Directory
thanks johnmck,
exactly what i was looking for, worked a treat.
cheers,
Patrick
ps. be sure to mark this post as [Solved]
exactly what i was looking for, worked a treat.
cheers,
Patrick
ps. be sure to mark this post as [Solved]

Re: Company Directory
YES this was extremely helpful!! I also recommend marking this [Solved]