แจ้งปัญหาที่พบ
include("config.php");
$strSQL = "SELECT * FROM problem ";
$objQuery = mysql_db_query($dbname,$strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 10; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$strSQL .=" order by problem_id DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
?>
//*** Select Question ***//
$strSQL = "SELECT * FROM problem WHERE problem_id = '".$_GET["problem_id"]."' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
//*** Update View ***//
$strSQL3 = "UPDATE problem ";
$strSQL3 .="SET problem_view = problem_view + 1 WHERE problem_id = '".$_GET["problem_id"]."' ";
$objQuery3 = mysql_query($strSQL3);
$strSQL4 = "SELECT * FROM problem_reply WHERE problem_id = '".$_GET["problem_id"]."'";
$objQuery4 = mysql_query($strSQL4) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery4);
$strSQL3 = "UPDATE problem ";
$strSQL3 .="SET problem_reply = $Num_Rows WHERE problem_id = '".$_GET["problem_id"]."' ";
$objQuery3 = mysql_query($strSQL3);
?>
$intRows = 0;
$strSQL2 = "SELECT * FROM problem_reply WHERE problem_id = '".$_GET["problem_id"]."' order by problem_date2,problem_time2 DESC" ;
$objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL."]");
$problem_id=$_GET["problem_id"];
$intRows2 = mysql_num_rows($objQuery2);
while($objResult2 = mysql_fetch_array($objQuery2))
{
$intRows++;
?> ความคิดเห็นที่ :
if($objResult2["nisit_id_reply"]==$_SESSION["mem_idcard"]){?>
} echo "
";}?>
กลับไปหน้ากระทู้คำถาม
mysql_close();
?>