数据库 abc字段id fenleinamecontent
--------------我现在是做一个list.php?id=[feilei字段内容]然后显示该分类的所有内容,并用分页
现在我知道的是select ... from abc where id= id=[feilei字段内容]=============有谁给这样的代码吗
--------------我现在是做一个list.php?id=[feilei字段内容]然后显示该分类的所有内容,并用分页
现在我知道的是select ... from abc where id= id=[feilei字段内容]=============有谁给这样的代码吗
$page=$_GET['page'];
$page=($page)?$page:1;
$offset=EACH_PAGE*($page-1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head><body><ol start="<?php echo $offset+1; ?>">
<?php $sql="select com_id,com_name from companies order by com_id desc";
$rs=$db->PageExecute($sql,EACH_PAGE,$page);while($o=$rs->fetchNextObject())
{$com_id=$o->com_id;
$com_name=$o->com_name;
echo '<li>'url("show.php?id=".$com_id,$com_name)'</li>',"\n";
}
?></ol></body>
</html>这个代码显示的是1.show.php?id=
2.show.php?id=
3.show.php?id=
4.show.php?id=
5.show.php?id=
6.show.php?id=
7.show.php?id=
8.show.php?id=
9.show.php?id=
10.show.php?id=