首頁 > 後端開發 > php教程 > 如何让记录集“内容不重复出现”

如何让记录集“内容不重复出现”

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
發布: 2016-06-13 11:27:27
原創
978 人瀏覽過

怎么让记录集“内容不重复出现”

<?php  require_once('Conn/hx98.php'); ?><br><?php <br />if (!function_exists("GetSQLValueString")) {<br>function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") <br>{<br>  if (PHP_VERSION     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;<br>  }<br><br>  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);<br><br>  switch ($theType) {<br>    case "text":<br>      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br>      break;    <br>    case "long":<br>    case "int":<br>      $theValue = ($theValue != "") ? intval($theValue) : "NULL";<br>      break;<br>    case "double":<br>      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";<br>      break;<br>    case "date":<br>      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br>      break;<br>    case "defined":<br>      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;<br>      break;<br>  }<br>  return $theValue;<br>}<br>}<br><br>$maxRows_hx = 10;<br>$pageNum_hx = 0;<br>if (isset($_GET['pageNum_hx'])) {<br>  $pageNum_hx = $_GET['pageNum_hx'];<br>}<br>$startRow_hx = $pageNum_hx * $maxRows_hx;<br> mysql_query("set names utf8");<br>mysql_select_db($database_hx98, $hx98);<br>$query_hx = "SELECT * FROM content_publish ORDER BY content_id DESC";<br>$query_limit_hx = sprintf("%s LIMIT %d, %d", $query_hx, $startRow_hx, $maxRows_hx);<br>$hx = mysql_query($query_limit_hx, $hx98) or die(mysql_error());<br>$row_hx = mysql_fetch_assoc($hx);<br><br><br><br>if (isset($_GET['totalRows_hx'])) {<br>  $totalRows_hx = $_GET['totalRows_hx'];<div class="clear">
                 
              
              
        
            </div>
登入後複製
相關標籤:
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
javascript - js正規符合特定字串
來自於 1970-01-01 08:00:00
0
0
0
為什麼說非物件呼叫成員函數fetch()
來自於 1970-01-01 08:00:00
0
0
0
資料庫設定檔必須要用二維數組
來自於 1970-01-01 08:00:00
0
0
0
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板