怎么让记录集“内容不重复出现”
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'];