![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
后页的分页我不会写了,谁能帮我补充完整呢 [PHP] if ($HTTP_POST_VARS['action']=="search"){ mysql_connect($dbhost,$dbuser,$dbpasswd) or die ("数据库连接失败"); if (($year!="") and ($month!="") and ($day!="")): $riqi = $year."-".$month."-".$day; $grtime = "and riqi = '$riqi'"; else: $grtime =""; endif; if ($age!=""): $grage = " and age like '%$age%'"; else: $grage =""; endif; if ($sex!=""): $grsex = " and sex like '%$sex%'"; else: $grsex =""; endif; if ($nation!=""): $grnation = " and nation like '%$nation%'"; else: $grnation =""; endif; if ($culture!=""): $grculture = " and culture like '%$culture%'"; else: $grculture =""; endif; if ($job!=""): $grjob = " and job like '%$job%'"; else: $grjob =""; endif; if ($degree!=""): $grdegree = " and degree like '%$degree%'"; else: $grdegree =""; endif; if ($study!=""): $grstudy = " and study like '%$study%'"; else: $grstudy =""; endif; if ($level!=""): $grlevel = " and level like '%$level%'"; else: $grlevel =""; endif; $searchgr = " WHERE 1 ".$grtime."".$grage."".$grsex."".$grnation."".$grculture."".$grjob."".$grdegree."".$grstudy."".$grlevel.""; mysql_connect($dbhost,$dbuser,$dbpasswd) or die ("数据库连接失败"); $sql = "SELECT COUNT(*) AS rcnt FROM $nxdzkj_grzp $searchgr ORDER BY id DESC"; $result = mysql_db_query($dbname, $sql); $row = mysql_fetch_array($result); $num = $row[rcnt]; if (empty($setid)): $setid = 0; endif; if ($num =="0"){ echo "

