blueman378 Posted April 18, 2008 Share Posted April 18, 2008 hey guys, well im including a code snippet into my site and it seems to be infinitly loading them from the database, heres the code: <table width="100%" border="1"> <?php $query1 = mysql_query("SELECT * FROM forum_maincats"); if(!$query1) die(mysql_error()); while($rows = $query1) { $catname = $rows['Catname']; ?> <tr><td bgcolor="blue"><?php echo $rows['Catname'];?></td></tr> <?php $query2 = mysql_query("SELECT * FROM forum_subcats WHERE mainid='$rows[id]'"); if(!$query2) die(mysql_error()); while($rowd = $query2) { ?> <tr><td bgcolor="green"><?php echo $rowd['catname']; ?></td><td><?php echo $rowd['description']; ?></td><td><?php echo $rowd['topics']; ?> Topics</td></tr> <?php } } ?> </table> and heres the url: http://webspirited.com/webspirited/forum/index.php?action=boards (look at it in firefox as in ie it jsut hangs, doesnt show anything) cheers Link to comment https://forums.phpfreaks.com/topic/101665-infinite-loading-from-database-why/ Share on other sites More sharing options...
blueman378 Posted April 18, 2008 Author Share Posted April 18, 2008 never mind got it Link to comment https://forums.phpfreaks.com/topic/101665-infinite-loading-from-database-why/#findComment-520159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.