This is my code to select and echo data
Select maintable.movie_title, group_concat(genres.genres_name) AS genres_name
FROM maintable
JOIN genres USING (tmdb_id)
GROUP BY maintable.tmdb_id,maintable.movie_title
HAVING find_in_set('$category1', genres_name) AND find_in_set('$category2', genres_name)
LIMIT $limit OFFSET $start
// Then fire it up
$stmt->execute();
// Pick up the result as an array
$result = $stmt->fetchAll();
I have 2 tables
1.) maintable
2.) genres table
Both tables are linked to each other using tmdb_id
(Please do not ask to show, what I tried. Trust me, it will make the question more confusing)
tmdb_idbut you selectmovie_title, a non aggregate column. This doesn't make any sense.