Slovig Posted December 14, 2006 Share Posted December 14, 2006 Hey. I'm new here but do have a site. I used to have MKPortal installed but that got messed up and I un-installed it. Now I'm trying to build my own homepage, but was wondering if there is a link to a code to show the last 10 threads that were posted on my forums? Can anyone help?[move]Thank you[/move]JesseSlovig.com Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/ Share on other sites More sharing options...
chiprivers Posted December 14, 2006 Share Posted December 14, 2006 Have you got the details of the table where your forum posts are stored? (presuming you have the forum posts stored in a mrsql table on your site!)Just has a link that goes to a page querying the table of posts, sort the posts most recenet date first and restrict results to 10 records. Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141418 Share on other sites More sharing options...
Slovig Posted December 14, 2006 Author Share Posted December 14, 2006 ??? ??? ??? ??? ???When I said I was new I meant reallllll new. Half the stuff you said, I did not understand. I use siteground for web hosting and that has all the SQL stuff.Can you kind of explain a little more in depthThanks Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141421 Share on other sites More sharing options...
chiprivers Posted December 14, 2006 Share Posted December 14, 2006 Is it MySQL database? I havn't worked with any other database but I am sure it is all pretty much the same!You will need to make sure you have a username and password to access the database and then also the table name and table column names for the table your forum posts are stored in.Do you have a page that currently displays your forum posts? Perhaps you can get the php script that displays that page and we can get the details we need from that. Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141424 Share on other sites More sharing options...
Slovig Posted December 14, 2006 Author Share Posted December 14, 2006 Yea its MySQLI do have the password and username to the databaseWhich table are the posts stored in?and no I dont have a page that currently displays the posts.Thanks guys Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141429 Share on other sites More sharing options...
chiprivers Posted December 14, 2006 Share Posted December 14, 2006 Have you got a forum at the moment?Have you got a control panel for your website where you can see your database details? Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141431 Share on other sites More sharing options...
Slovig Posted December 14, 2006 Author Share Posted December 14, 2006 Yes. I have Invision Power Board.Slovig.com/forumsMy site host offers cPanel to manage the sites. Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-141432 Share on other sites More sharing options...
Slovig Posted December 31, 2006 Author Share Posted December 31, 2006 Ok. With some help from one of my friends. I think I got it all down. But when I upload the page to my site, and go to it, all it displays is "251", which isn't even the right number of posts on my forums....So far, this is my code[code]<?php$link = mysql_connect('localhost', '*******', '*******');if (!$link) { die('Could not connect: ' . mysql_error());}mysql_select_db ("*******");$result = mysql_query($sql = 'SELECT * FROM `ibf_posts` ORDER BY `post_date` DESC LIMIT 0, 30 ');if (!$result) { die('Could not query:' . mysql_error());}echo mysql_result($result, 2);mysql_close($link);?> [/code]If someone could help. Like I said, my friend helped write this, I only know what some of it does. Oh yea. where the stars are, i have what is needed there, just not posting that. Link to comment https://forums.phpfreaks.com/topic/30688-last-topics-posted-help-im-new/#findComment-150203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.