So I’ve been looking around and keep on getting errors when I try this, so…
I need to count all the rows from a table whose book ID is the same book ID as a bunch of rows whose user ID is a known number, say 1.
So, something like this:
SELECT id FROM posts WHERE book = (SELECT book FROM posts WHERE user='$user_id')
The purpose of this query is to count all the books posted by other users (that are the same book).