Hi Everyone.

First I want to thank everone who postes on this in Advance.

I am NEW to php, iv currently have read one of three books that I have purchased to learn php. So when i look at the code i kinda know whats happening if its simple :-)

Here is what I am tring to do. I have a php forum board on my site located on a seperate page. I want to be able to show the currnent topics say the last ten posts that has happen on the forum board. The trick is I want to display these on the index page.

I do not want to just dispaly the whole forum on the front page. I just want the currnet topics that have had a reply to.

If someone could help me on this, or even point me to a book or a website that shows how to do this, IT would be great.

Thanks
Daryl
www.theharvestnetwork.net

    hi daryl

    what you need to do is be able to read the data stored by your forum. Find out whether your forum uses files or a database - database is more likely, and is likely to be mysql.

    Then use a tool like www.phpmyadmin.net to have a look at the database - phpmyadmin is installed by default on most hosted web servers.

    Then, read the manual pages on [man]mysql[/man] and learn how to query the database and display the result.

    Good luck!

    adam

      HI Adam,

      Thanks for the info.

      Yes this is a mysql database forum. I was able to find the information i needed in the pphadmin page.

      I think i might just be able to figure this out. :-)

      the table i was looking for was the "posts" table. Yet there is a code i dont understand. its a limit (0,30) If I am not misstaken that means it will show only the newest 30 posts?

      thanks

        yeah, limit(0,30) means fetch from the first row (confusingly this is numbered 0) and fetch 30 rows

        if you combine this with ORDER BY fieldname ASC (or DESC) then this will fetch the first 30, the last 30, or whatever - depending on how it is sorted.

          Write a Reply...