欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2024-01-05 08:51:16
...
怎么让记录集“内容不重复出现”

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$maxRows_hx = 10;
$pageNum_hx = 0;
if (isset($_GET['pageNum_hx'])) {
$pageNum_hx = $_GET['pageNum_hx'];
}
$startRow_hx = $pageNum_hx * $maxRows_hx;
mysql_query("set names utf8");
mysql_select_db($database_hx98, $hx98);
$query_hx = "SELECT * FROM content_publish ORDER BY content_id DESC";
$query_limit_hx = sprintf("%s LIMIT %d, %d", $query_hx, $startRow_hx, $maxRows_hx);
$hx = mysql_query($query_limit_hx, $hx98) or die(mysql_error());
$row_hx = mysql_fetch_assoc($hx);



if (isset($_GET['totalRows_hx'])) {
$totalRows_hx = $_GET['totalRows_hx'];
如何让记录集“内容不重复出现”

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


上一篇:

下一篇: