<?php
error_reporting (0);
date_default_timezone_set('Asia/Shanghai');
header('Content-Type: text/html; charset=utf-8');
$page=ceil($_GET['page']);
$q=$_GET['q'];
if($page==''){$page=1;}
$min=($page-1)*30;
$max=30;
   /*获取总记录数*/
    $TRecord = mysql_query("SELECT * FROM ".$BIAOTOU."content where `title` like '%$q%'");
    $RecordCount = mysql_num_rows($TRecord);
    $pagelast=ceil($RecordCount/30); /*总页数*/
	$rows=$mysql->query("select * from `".$BIAOTOU."content` where `title` like '%$q%' order by id desc limit {$min},{$max}");
	$n=mysql_query("select * from `".$BIAOTOU."content` where `title` like '%$q%' order by id desc limit {$min},{$max}");
	$n = mysql_num_rows($n);
	$row=$rows[0];
	


?>