I have a simple mysql database where user has its own events table and invited events table.
User-->>Own events (user_id is foreign key )
User and Own events-->>Invited Events(user_id is foreign key, event id is foreign key)
I want to get OWN EVENT details from Invited Events where user_id is equal to some number
Example:

I try:
$user_id = $_POST["user_id"];
$stmt = $mysqli->query("SELECT A1.event_id,A1.root_folder,A1.event_name,A1.date,A1.location,A2.user_id FROM OWN_EVENTS A1, INVITED_EVENTS A2 WHERE A2.user_id=$user_id");
$rows = array();
while($r = mysqli_fetch_assoc($stmt)) {
$rows[]=$r;
}
This supposed give me (one row) event details of event_id=3 where user_id=58 but this returns all the rows in the OWN_EVENTS table.
What am I doing wrong ?