I have a table of blog posts in one table. In a separate table i have records of images that are stored in a directory that are tied to specific blog posts.
How can i write a query that selects only blog posts that have at least 5 photos?
The BlogPosts table has an ‘ID’ column. The Photos table has a ‘PostID’ column that corresponds to the the BlogPosts’ ‘ID’ column.
$query = "SELECT * FROM BlogPosts WHERE ?"
1 Answer