Bobd314 Posted December 7, 2003 Share Posted December 7, 2003 Hmm, well I need a way to sort all the things in the MySQL database I made. I have a download\'s category but I want to be able to have a page that lists all the categorys and then the category is a link to a page that has all the download\'s that are in that category. Also if the category is \'font\' on one and \'font\' on another one I dont want it to show 2 links for \'font\'. I have the page to add download\'s and crap but I dont know how to make this. I also have a page now that shows all the downloads just in a list but it doesnt category\'ize them. (Yes I know I posted this in the PHP secion too but I dont know where it would go) Quote Link to comment https://forums.phpfreaks.com/topic/1468-categorys-and-making-them-link/ Share on other sites More sharing options...
triphis Posted December 7, 2003 Share Posted December 7, 2003 Well, you just make a page that lists all the categories. Then, using a typical HTML link, do this: <a href="http://www.yourdomain.com/whatever.php?cat=font">Font</a><br> <a href="http://www.yourdomain.com/whatever.php?cat=games">Games</a> Etc. Then, on that something.php page, do this: $q="SELECT * FROM table WHERE category=$cat ORDER BY name ASC"; YOu know how to do mysql... That statement will take all items with that category, and order them alphabetically. Quote Link to comment https://forums.phpfreaks.com/topic/1468-categorys-and-making-them-link/#findComment-4845 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.