MySQL Update Column +1?
The easiest way is to not store the count, relying on the COUNT aggregate function to reflect the value as it is in the database: SELECT c.category_name, COUNT(p.post_id) AS num_posts FROM CATEGORY c LEFT JOIN POSTS p ON p.category_id = c.category_id You can create a view to house the query mentioned above, so you can … Read more