I've got 2 tables that I want to join together where the id of the second table matches the id of the first table and is outputted together as row.
The first table is "boys" and has a column of "id" and "name".
The second table is "girls" and has a column of "id" and "name".
How do I get the matching ids to join as a single row when output in PHP? I went through a whole basic SQL tutorial about joins and am having trouble wrapping my head around the logic for some reason. Any help ?
$result = mysql_query("
SELECT *
FROM boys
LEFT JOIN girls
WHERE boys.id = girls.id
");
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\xampp\main3.php on line 28