0) { if($Rs = mysql_fetch_array($result)) { $strSubject = $Rs["STR_PRODUCT_SUBJECT"]; $intSubCatID = $Rs["INT_PRODUCT_CATEGORY_ID"]; $strImage = $Rs["STR_IMAGE_LARGE_FILENAME "]; $strDetail=$Rs["STR_PRODUCT_DETAIL"]; //$dteNewsDate = RLDateFormat($Rs[DTE_PRODUCT_DATE] , "dmyyyy", 2); } } mysql_free_result($result); } else { header("Location: our-product.php"); } //=== Find Previous ID ===// //$strSql = "SELECT t2.INT_PRODUCT_ID FROM tbl_product t1 , tbl_product t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t1.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND (t2.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND ((t1.DTE_PRODUCT_DATE > t2.DTE_PRODUCT_DATE) OR ((t1.DTE_PRODUCT_DATE = t2.DTE_PRODUCT_DATE) AND (t1.INT_PRODUCT_ID > t2.INT_PRODUCT_ID))) AND (t1.INT_PRODUCT_ID <> t2.INT_PRODUCT_ID) AND (t1.INT_PRODUCT_ID = $intProductID) ORDER BY t2.INT_ORDER DESC "; $strSql = "SELECT t2.INT_PRODUCT_ID FROM tbl_product t1 , tbl_product t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t1.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND (t2.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t1.INT_ORDER > t2.INT_ORDER) AND (t1.INT_PRODUCT_ID <> t2.INT_PRODUCT_ID) AND (t1.INT_PRODUCT_ID = $intProductID) ORDER BY t2.INT_ORDER DESC "; //echo $strSql; $result = mysql_query($strSql); $num = mysql_num_rows($result); if ($num > 0) { if($Rs = mysql_fetch_array($result)) { $intPrevID = $Rs["INT_PRODUCT_ID"]; } } else { $intPrevID = NULL; } mysql_free_result($result); //================// //=== Find Next ID ===// //$strSql = "SELECT t2.INT_PRODUCT_ID FROM tbl_product t1 , tbl_product t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t1.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND (t2.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND ((t1.DTE_PRODUCT_DATE < t2.DTE_PRODUCT_DATE) OR ((t1.DTE_PRODUCT_DATE = t2.DTE_PRODUCT_DATE) AND (t1.INT_PRODUCT_ID < t2.INT_PRODUCT_ID))) AND (t1.INT_PRODUCT_ID <> t2.INT_PRODUCT_ID) AND (t1.INT_PRODUCT_ID = $intProductID) ORDER BY t2.INT_ORDER ASC "; $strSql = "SELECT t2.INT_PRODUCT_ID FROM tbl_product t1 , tbl_product t2 WHERE (t1.BIT_ENABLE=1) AND (t1.INT_LANG=$intWebLang) AND (t1.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t2.BIT_ENABLE=1) AND (t2.INT_LANG=$intWebLang) AND (t2.INT_PRODUCT_CATEGORY_ID = $intSubCatID) AND (t1.INT_ORDER < t2.INT_ORDER) AND (t1.INT_PRODUCT_ID <> t2.INT_PRODUCT_ID) AND (t1.INT_PRODUCT_ID = $intProductID) ORDER BY t2.INT_ORDER ASC "; $result = mysql_query($strSql); $num = mysql_num_rows($result); if ($num > 0) { if($Rs = mysql_fetch_array($result)) { $intNextID = $Rs["INT_PRODUCT_ID"]; } } else { $intNextID = NULL; } mysql_free_result($result); //================// ?> Thai Kansai Paint Co., Ltd.
 
 
0){ ?>
เอกสารแนบ

[ kb.]

 
Previous Next