how would i go about putting the top 5 links of each category on the first page.. i know everything except for how to make this prepare statement..
right now.. i don't see how to do this WITH category alternatives without giving the same link twice.. so that doesn't matter at all to me..
but what i am trying to get is for it to work with the categories subcategories..
using CategoryHeiarchy of course..
SELECT Links.*
FROM Links, CategoryHeiarchy
WHERE Links.CategoryID = ? OR
CategoryHeiarchy.SubCategoryID = Links.CategoryID
ORDER BY Hits DESC
LIMIT 5
any ideas?
jerry
right now.. i don't see how to do this WITH category alternatives without giving the same link twice.. so that doesn't matter at all to me..
but what i am trying to get is for it to work with the categories subcategories..
using CategoryHeiarchy of course..
SELECT Links.*
FROM Links, CategoryHeiarchy
WHERE Links.CategoryID = ? OR
CategoryHeiarchy.SubCategoryID = Links.CategoryID
ORDER BY Hits DESC
LIMIT 5
any ideas?
jerry