im trying to select all data from my "events" table whenever the "event id" matches with the "user id". However i get an error 1242 Subquery returns more than 1 row.
$query = "SELECT * FROM events WHERE id = (SELECT event_id FROM booking_dates WHERE user_id = '{$user_id}')";
$event_set = mysqli_query($connection, $query);
I understand that my subquery will return multiple rows because a user can attend multiple events. So how can I make my query accept multiple rows?