Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 php 绘制图表。我想绘制从表中的结果计数返回的值:
SELECT COUNT(*) FROM tAnswer WHERE Answer1 = '1';
查询返回 3。我现在希望将这 3 存储在 php 变量中。
我该怎么办?
别名 COUNT(*) 的名称如下,
SELECT COUNT(*) AS C FROM ...
然后您可以像访问任何返回的列一样访问它,即。$row['C']
$row['C']