All pastes #91850 Raw Edit

Mine

public text v1 · immutable
#91850 ·published 2006-07-18 23:53 UTC
rendered paste body
function main_forum_layout() {  
$categories = $db->GetAll("SELECT * FROM forum_categories ORDER BY c_order ASC");
  if ($categories === false) die("Failed");
    foreach($categories as $rcategories) {
	  
	  $catid = $rcategories['c_id'];
	  echo "<b>";
	  echo $rcategories['name'];
	  echo "</b><br />";
	  
	    $boards = $db->GetAll("SELECT * FROM forum_boards WHERE c_id='$catid' ORDER BY b_order ASC");
	      if ($boards === false) die("Failed Boards");
	        foreach($boards as $rboards) {
			  
			  echo $rboards['name'];
			  echo "<br />";
			  echo $rboards['description'];
			  echo "<br /><br />";
			  
			}
	  
	}
}

main_forum_layout();


WITH THIS ERROR:

Fatal error: Call to a member function GetAll() on a non-object in C:\wamp\www\forums\index.php on line 19