Jump to content

Programming a Forum


MemphiS

Recommended Posts

Could some users with experience provide smoe examples on how they access thier mysql data to display to the user.

 

I currently use the following method:

 

<?php
$forum = mysql_query("SELECT `id` , `topic_by` , `topic_header` , `date` FROM `forums` ORDER BY `date` LIMIT 0,30");
while ($getForum = mysql_fetch_row($forum)){
echo("<tr><td><a href='viewforum.php?view=$getForum[0]'>$getForum[2]</a> by $getForum[1] on $getForum[3]</td></tr>");
}
?>

 

Also i have replys showing the users posts, topics made and an image like this forum.  This lags the load time huge and i would like to improve it.

 

Just looking to improve load times.. =) Thanks

Link to comment
https://forums.phpfreaks.com/topic/76030-programming-a-forum/
Share on other sites

<?php
$forum = mysql_query("SELECT `id` , `topic_by` , `topic_header` , `date` FROM `forums` ORDER BY `date` LIMIT 0,30");
while ($getForum = mysql_fetch_assoc($forum)){
echo("<tr><td><a href='viewforum.php?view=".$getForum["id
"]." '>".$getForum["topic_by"]."</a> by ".$getForum["topc_header"]." on ".$getForum["date"]."</td></tr>");
}
?>

Link to comment
https://forums.phpfreaks.com/topic/76030-programming-a-forum/#findComment-384877
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.