# MEMSQL returing undefined results

**URL:** <https://www.singlestore.com/forum/t/memsql-returing-undefined-results/261>\
**Category:** Query Tuning\
**Created:** [January 28, 2019, 4:31pm UTC](https://www.singlestore.com/forum/t/memsql-returing-undefined-results/261 "2019-01-28T16:31:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.mcguire](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/b/b9e5f3/32.png) [@brian.mcguire](https://www.singlestore.com/forum/u/brian.mcguire)\
**Post date:** [January 28, 2019, 4:31pm UTC](https://www.singlestore.com/forum/t/memsql-returing-undefined-results/261/1 "2019-01-28T16:31:33Z")

</div>

I am trying to query results from my MEMSQL database, and have been unsuccessful.  
Once the application starts i get an error stating" The solution is undefined" , followed by the  
results i’m trying to query.

The results show up in the console log, but not in the actual application.

Ive attached a copy of my code below:

connection.connect(function(err){

if (err) throw err  
});

function getTeams(callback){

var results = connection.query(‘SELECT ID, NAME FROM TEAM’,function(err, results, fields){

if (err) throw err  
[//console.log](https://console.log)(results);  
console.log('The solution is: ', results[0].solution);

return callback(results);  
});  
}

Your help will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [January 28, 2019, 9:47pm UTC](https://www.singlestore.com/forum/t/memsql-returing-undefined-results/261/2 "2019-01-28T21:47:17Z")

</div>

I’m not familiar with this area, but for someone to help, it’ll help to know the application programming language & version, OS version, MemSQL version, driver name, and driver version.

---

<div class="post-metadata">

**Author:** ![jack](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/jack/32/204_2.png) [@jack](https://www.singlestore.com/forum/u/jack)\
**Post date:** [January 29, 2019, 2:33am UTC](https://www.singlestore.com/forum/t/memsql-returing-undefined-results/261/3 "2019-01-29T02:33:01Z")

</div>

Your query doesn’t select a “solution” field, so that’s why results[0].solution would be undefined.
