title: MYSQL FULL JOIN simulation query, unexpected result
body: <p>I have two tables, markers and markerDetails.  I want to append to the rows of markers values from rows of markerDetails, NULL VALUES IF THERE ISN'T A ROW IN markerDetails.  The common columns on both are latitude and longitude.  I've tried many different variations of <code>UNION</code> with <code>LEFT JOIN</code> and <code>RIGHT JOIN</code>.</p>
  
  <p>Here's my query right now, simple and it almost works:</p>
  
  <pre><code>$query = mysqli_query($link, "SELECT * FROM markers as m LEFT JOIN markerDetails as md 
          on m.latitude=md.latitude AND m.longitude=md.longitude WHERE m.whoAdded='$user'");
  
  //tried, same result as above
  mysqli_query($link, "SELECT * FROM markers as m LEFT JOIN markerDetails as md on
      m.latitude=md.latitude AND m.longitude=md.longitude WHERE m.whoAdded='$user' UNION SELECT * FROM markers as m 
      RIGHT JOIN markerDetails as md on m.latitude=md.latitude AND m.longitude=md.longitude");
  </code></pre>
  
  <p>Problem with this query, if there isn't a row in markerDetails, for some reason it gives me a NULL id, NULL latitude and NULL longitude.  If there is a row in markerDetails, I get the id of markerDetails row, not the markers row...</p>
  
  <p>Ideally I want to have the entire row from markers with appended row from markerDetails, with one instance of latitude and longitude...and still using <code>WHERE m.whoAdded='$user'</code>.  What am I not understanding with JOIN queries here?</p>
  
  <pre><code>markers STRUCTURE:
  id  latitude  longitude  whoAdded  locationType  locationName  numChecks numImgs numRevs   timeadded
  markerDetails STRUCTURE:
  id  latitude  longitude  locAdd  locHrs  locPh  locSt  locApp  locMsg  locMn
  </code></pre>
  
  <p>So the desired output should be:</p>
  
  <pre><code>id (of markers), latitude, longitude, whoAdded, locationType, locationName, 
  numChecks, numImgs, numRevs, locAdd, locHrs, locPh, locSt, locApp, locMsg, locMn
  </code></pre>