标签: php mysql
这对我不起作用:
$query = mysql_query(" SELECT max(id) FROM chat_records "); while ($row = mysql_fetch_assoc($query)) { echo $row['id']; }
我怎样才能让它发挥作用?
答案 0 :(得分:4)
将您的查询更改为:
SELECT max(id) AS id FROM chat_records