title: MySQL query missing results in node-mysql that are returned in phpMyAdmin
body: <p>My SQL query returns four columns when I run it in phpMyAdmin, but only two when performed through Node.js and the mysql package. I suspect it might have to do with the asynchronicity or with LEFT JOIN, but I can't figure it out.</p>
  
  <p>Node index.js:</p>
  
  <pre><code>app.get('/name', function (req,res){
    var query='SELECT s.result, s.distance, hp.result, hp.distance FROM `table15` s LEFT JOIN `table14` hp on s.name = hp.name WHERE s.name = "John Appleseed"';
    pool.query(query,function(err, result) {
      if (err) throw err;
      console.log(result);
      res.json(result);
    });
  });
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>  $.ajax({
        url : "/name",
        type : "GET",
        success : function(data){
            var len = data.length;
            console.log(data);
        }
    });
  </code></pre>
  
  <p>Returns in browser and console: </p>
  
  <pre><code>[{result: "36:24", distance: 12}]
  </code></pre>
  
  <p>But in phpMyAdmin I get four columns and would therefor expect something like this in the browser as well:</p>
  
  <pre><code>[{result: "00:35:29", distance: 12, result: "36:24", distance: 12}]
  </code></pre>