0) { if($Rs = mysql_fetch_array($result)) { $strSubject = $Rs[STR_NEWS_SUBJECT]; $strDetail = $Rs[STR_NEWS_DETAIL]; //$dteNewsDate = RLDateFormat($Rs[DTE_NEWS_DATE] , "dmyyyy", $intWebLang); $dteNewsDate = RLDateFormat($Rs[DTE_NEWS_DATE] , "dmyyyy", 2); $strImage = $Rs[STR_IMAGE_THUMB_FILENAME]; } } mysql_free_result($result); } else { header("Location: news.php"); } //=== Find Previous ID ===// $strSql = "SELECT t2.INT_NEWS_ID FROM tbl_news t1 , tbl_news t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND ((t1.DTE_NEWS_DATE > t2.DTE_NEWS_DATE) OR ((t1.DTE_NEWS_DATE = t2.DTE_NEWS_DATE) AND (t1.INT_NEWS_ID > t2.INT_NEWS_ID))) AND (t1.INT_NEWS_ID <> t2.INT_NEWS_ID) AND (t1.INT_NEWS_ID = $intNewsID) ORDER BY t2.DTE_NEWS_DATE DESC, t2.INT_NEWS_ID DESC "; //echo $strSql; $result = mysql_query($strSql); $num = mysql_num_rows($result); if ($num > 0) { if($Rs = mysql_fetch_array($result)) { $intPrevID = $Rs[INT_NEWS_ID]; } } else { $intPrevID = NULL; } mysql_free_result($result); //================// //=== Find Next ID ===// $strSql = "SELECT t2.INT_NEWS_ID FROM tbl_news t1 , tbl_news t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND ((t1.DTE_NEWS_DATE < t2.DTE_NEWS_DATE) OR ((t1.DTE_NEWS_DATE = t2.DTE_NEWS_DATE) AND (t1.INT_NEWS_ID < t2.INT_NEWS_ID))) AND (t1.INT_NEWS_ID <> t2.INT_NEWS_ID) AND (t1.INT_NEWS_ID = $intNewsID) ORDER BY t2.DTE_NEWS_DATE ASC, t2.INT_NEWS_ID ASC "; $result = mysql_query($strSql); $num = mysql_num_rows($result); if ($num > 0) { if($Rs = mysql_fetch_array($result)) { $intNextID = $Rs[INT_NEWS_ID]; } } else { $intNextID = NULL; } mysql_free_result($result); //================// ?> Thai Kansai Paint Co., Ltd.
 
 
 



=640){ $intWidth = 640; }else{ $intWidth = $Width; } ?>
0){ ?>
เอกสารแนบ

[ kb.]
 
Previous Next ข่าวทั้งหมด