gaza165 Posted November 2, 2008 Share Posted November 2, 2008 I am creating a forum it goes like this There are topics such as PHP Help, CSS and XHTML Help Inside topics there are forums ... i.e PHP Help >>> General PHP Help I am trying to bring back a list of topics from the database including their forums so like PHP Coding General PHP Help Advanced PHP CSS AND XHTML Basic CSS This is the SQL query i have but it doesnt seem to come out as expected.... <?php include ("dbconnect/dbconnect.php"); $result = mysql_query("SELECT forum.forum_id, forum.title, forum.description, topics.topic_title FROM forum INNER JOIN topics ON forum.topic_id = topics.topic_id GROUP BY topics.topic_title "); while($rs = mysql_fetch_array($result)) { echo $rs['topic_title']; echo "<table width='100%' class='forumtable'>"; echo "<tr'>"; echo "<td>"."<h1><a href='forum.php?forum_id=".$rs['forum_id']."'>".$rs['title']."</a></h1>"."<p>".$rs['description']."</p></td>"; echo "</tr>"; } echo "</table>"; can someone take a look and tell me where i am going wrong?? Link to comment https://forums.phpfreaks.com/topic/131087-need-help-with-db-logic/ Share on other sites More sharing options...
wildteen88 Posted November 2, 2008 Share Posted November 2, 2008 Have a look at this topic. They had a similar problem to you. May be it'll help. Link to comment https://forums.phpfreaks.com/topic/131087-need-help-with-db-logic/#findComment-680594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.