Gazan Posted January 24, 2008 Share Posted January 24, 2008 Hey guys, How would i create a function to show how many topics there excists in my topic table ? Like, if there is.. 10 topics, then it shows "10" Quote Link to comment https://forums.phpfreaks.com/topic/87643-counting-topics-in-a-database/ Share on other sites More sharing options...
sasa Posted January 24, 2008 Share Posted January 24, 2008 SELECT COUNT(DISTINCT topic) FROM topic_table Quote Link to comment https://forums.phpfreaks.com/topic/87643-counting-topics-in-a-database/#findComment-448259 Share on other sites More sharing options...
Gazan Posted January 24, 2008 Author Share Posted January 24, 2008 And how would i echo it in a php code? Quote Link to comment https://forums.phpfreaks.com/topic/87643-counting-topics-in-a-database/#findComment-448261 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.