# query.php require("func.php"); $sql="select * from boardinfo"; $sql_result=mysql_query($sql); ?>
main
论坛贴子查询
论坛信息
# query_list.php require("func.php"); if (!empty($query_str)) {
if(!is_board_exits($board)){ $board="computer"; } if ($title){ $submit="title"; } elseif ($cont) { $submit="cont"; } elseif ($writer) { $submit="writer"; } else { $submit="title"; } $sql="select * from $board where ($submit like '%$query_str%')"; $temp=mysql_query($sql); $sum=mysql_num_rows($temp); if ($sum!=0) { $sql="select * from boardinfo where name='$board'"; $sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); $chinesename=$sql_row[chinesename]; setcookie ("jl_forum[chinesename]",$chinesename); $sql="select name from user where slaveboard='$board'"; $sql_result=mysql_query($sql); ?>
$totalpage=ceil($sum/$pagesize); # 分页 if($page<1 or empty($page)){ $page=1; } elseif ($page>$totalpage){ $page=$totalpage; } elseif ($totalpage==0) { $page=0; } $offset=($page-1)*$pagesize; $sql="select * from $board where ($submit like '%$query_str%') order by id desc limit $offset,$pagesize"; $sql_result=mysql_query($sql); ?>
查询到条纪录
回应
主 题
时 间
人气
while ($sql_row=mysql_fetch_array($sql_result)) { echo"
http://www.bkjia.com/PHPjc/316374.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316374.htmlTechArticle# post.php ?php require(config.inc.php); $sql=select * from boardinfo where name='$board'; $sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); ? html head title发...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn