dz3.1 Forum Add a line of code page blank 
This post was last edited by seqq001 on 2014-06-12 13:13:00 
source\module\forum\forum_forumdisplay.php add
 
 
$query = $db->query ("select * from bbs_forum_post where tid = ' $tid '");
while ($result = $db->fetch_array ($query)) {
      $mythread [] = $result;
} 
Forumdisplay_list.htm the template file to add 
  
{$val [message]} 
  
 
Web page blank, what's going on 
 
------Solution-------------------- 
1. Open the View error log 
2, print the relevant variables to see, in which line error 
Visual $db does not exist, DX3 later do not support this kind of writing 
------Solution-------------------- 
Discuz has its own database class that encapsulates a number of methods that also contain security filtering 
 
$query = $db->query ("select * from bbs_forum_post where tid = ' $tid '"); 
while ($result = $db->fetch_array ($query)) { 
$mythread [] = $result; 
} 
 
You've changed this paragraph 
 
$tid = Intval ($tid); 
$mythread = Db::fetch_all (' select * from '. Db::table (' Forum_post '). ' Where tid = $tid ');