How do you deal with a join statement if one of the tables you are joining does not have any data for the user in it.
For example:
-user_1 is listed in all tables.
-user_2 is listed in table_1, table_2, and table_3 but not in table_4.
The following query fails because user_2 is not in table_4.
$query = "SELECT table_1.username, table_2.car, table_3.bike, table_4.plane
FROM table_1
JOIN table_2
ON table_1.username=table_2.username
JOIN table_3
ON table_1.username=table_3.username
JOIN table_4
ON table_1.username=table_4.username
WHERE table_1.username = 'user_2'";