::: Select ::: Data; $strSql = "SELECT ContentCategoryId,Categoryname$strCurrentLangauge FROM $strCfgDbTableNewsCategory WHERE Active = 'Y' ORDER BY SortOrder"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSqlChangeMe"; die("Invalid query: " . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $ContentCategoryIdTemp = $row[ContentCategoryId]; $CategoryNameTemp = $row["Categoryname$strCurrentLangauge"]; $strSelected = ""; if ($ContentCategoryIdTemp == $ContentCategoryId) { $strSelected = "selected"; } $strContentCategoryIdSelect .= <<$CategoryNameTemp Data; } mysql_free_result($objResult); $tp->Block("ContentCategory"); $strSql = "SELECT ContentCategoryId,CategoryNameTh,CategoryNameEn FROM $strCfgDbTableNewsCategory ORDER BY SortOrder"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSqlChangeMe"; die("Invalid query: " . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $ContentCategoryId = $row[ContentCategoryId]; $CategoryName = $row["CategoryName$strCurrentLangauge"]; $tp->Apply(); } mysql_free_result($objResult); $tp->Block("ContentCategory2"); $strSql = "SELECT ContentCategoryId,CategoryNameTh,CategoryNameEn FROM $strCfgDbTableNewsCategory ORDER BY SortOrder"; $objResult = mysql_query($strSql); if (!$objResult) { echo "$strSqlChangeMe"; die("Invalid query: " . "" /*mysql_error()*/); } while($row = mysql_fetch_array($objResult)) { $ContentCategoryId = $row[ContentCategoryId]; $CategoryName = $row["CategoryName$strCurrentLangauge"]; $tp->Apply(); } mysql_free_result($objResult); mysql_close($objDb); $tp->Display(); exit; /*------------------------------------------------------------------*/ ?>