<CFQUERY NAME="GetSite" DATASOURCE="#DSN#">
SELECT ID, URL, PageName, CategoryID, Description, DateAdded, addedBy, Notes, SubcategoryID,(SELECT Category FROM CategoryList WHERE CategoryList.CategoryID=Webs.CategoryID) as CatName
FROM Webs
ORDER BY CategoryID, PageName
</CFQUERY>
I need to sort the list by CatName, but get an error if I change the ORDER BY to
ORDER BY CatName, PageName
The categoryID in the Webs table is just numbers, so they display in groups but not alphabetically.
Any idea on how to capture this information?
thanks!
Stephanie
SELECT ID, URL, PageName, CategoryID, Description, DateAdded, addedBy, Notes, SubcategoryID,(SELECT Category FROM CategoryList WHERE CategoryList.CategoryID=Webs.CategoryID) as CatName
FROM Webs
ORDER BY CategoryID, PageName
</CFQUERY>
I need to sort the list by CatName, but get an error if I change the ORDER BY to
ORDER BY CatName, PageName
The categoryID in the Webs table is just numbers, so they display in groups but not alphabetically.
Any idea on how to capture this information?
thanks!
Stephanie