MemphiS Posted November 5, 2007 Share Posted November 5, 2007 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 More sharing options...
redarrow Posted November 5, 2007 Share Posted November 5, 2007 <?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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.