mysql求和函数使用示例

复制代码 代码如下: $sql="SELECT SUM(prise) sum from buylist where mid = '1'"; $ress=mysql_query($sql); echo $rowxiaofei=mysql_fetch_assoc($ress);

复制代码 代码如下: $sql="SELECT SUM(prise) sum from buylist where mid = '1'"; $ress=mysql_query($sql); echo $rowxiaofei=mysql_fetch_assoc($ress);