select (jgdw+hxjg+fwzl+dlwz+zbhj)/5
from 表
where aid = 513这个是查询文章编号aid=513表里的几个字段的平均值,我的每个文章的id都不一样,也就是说513不是一个固定的数字,查询该怎么写?select count(*) from 表
where aid= 12227
group by aid这个同样的道理,也就是说12227不是固定的,他是根据文章页面的变化,自动获得当前文章的id编号,该如何写啊?非常感谢大侠们。
www.xxx.com/archive.php?aid=14160 文章列表是这种格式的。selectdbmysqlphp
from 表
where aid = 513这个是查询文章编号aid=513表里的几个字段的平均值,我的每个文章的id都不一样,也就是说513不是一个固定的数字,查询该怎么写?select count(*) from 表
where aid= 12227
group by aid这个同样的道理,也就是说12227不是固定的,他是根据文章页面的变化,自动获得当前文章的id编号,该如何写啊?非常感谢大侠们。
www.xxx.com/archive.php?aid=14160 文章列表是这种格式的。selectdbmysqlphp
from 表
where aid =".$_GET['aid'];下面那个类似
select (jgdw+hxjg+fwzl+dlwz+zbhj)/5
from 表
where aid = $_GET[aid]
这样不就好了。。
select count(*) from 表
where aid= $_GET[aid]
group by aid但愿没误解LZ的意思