查询返回号码

时间:2018-02-08 14:10:13

标签: php sql

$total_rows = myDB::query("Select count(id) from video");
while ($total = myDB::fetchAssoc($total_rows)) {
   $result["total"]=$total;
}

这回到我身边

total:{count(id): "3"}
       count(id):"3"

如何才能只返回总数:3 提前谢谢!

1 个答案:

答案 0 :(得分:1)

$result["total"]=$total['total];