Jump to content

Get just a few outputs from mysql


reportingsjr

Recommended Posts

I know this should probably be in the mysql forum but meh.. dont feel like it :).I was too lazy to create a topics table and posts table in mysql, so now I have run into any issue.. how do I get it so it only echos out one of each posts? If this isnt possible.. then I have alot more work to do to re format it :). I might just start reformatting it now lol..Tell me if this is possible, the way I have it now it just echos out every post with the topic title...EDIT: scratch it, it wont take too much work to reformat it, but is there a way to do this?

Link to comment
Share on other sites

Ok, so you want to get the number of topics, but you only have a table holding forum posts with topics as VARCHAR() fields, I'm guessing. You can do that without much of a problem, actually. Just do this:

SELECT DISTINCT post_name FROM post_table;

Hope this helps :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...