UPDATE post_categories
SET posts_counter = ".$sql_totalbooknumber."
WHERE `name` = 'Posts'
使用上面的查询,我在“where子句”MYSQL错误中不断收到未知列“Posts”
这是我的 $sql_totalbooknumber
$sql_totalbooknumber = "SELECT SUM(posts_counter) FROM post_categories
WHERE posts_counter
> '0' AND category_id
!= '355'";