SELECT multiple data from MySQL node.js with promises
<p>The concept of promises is very new for me (so far, I was working with async.each and async.waterfall)
I want to use promises but i'm stuck right now.</p>

<p>I want to get "tags" from my db. 
I have two tables for this : One called 'tags' with every tag in it (with an ID) and another one 'user_tags' with every username saved and the ID of the tag that the user (username) created and saved into 'tags'.</p>

<p>I can put information in my DB but now I want to pull this out and log it out (I will display it later)</p>

<p>So far this is my idea :</p>

<pre><code>var getUserprofile = function getUserprofile(username, callback){
  pool.getConnection(function (err, connection) {
    var dataUser = [];

    // Error check
    if (err) {
      console.log(err);
    }

    connection.query('SELECT * FROM users_tags FULL JOIN tags ON (tags.id = users_tags.t_id) WHERE users_tags.user_id=666;', username , function (err, rows, fields) {
      if (err) {
        connection.release();
        cb(err);
      } else if (rows.length &lt; 1) {
        connection.release();
        cb("We don't have any informations about this user yet");

      } else {
        console.log("we pull the information right now");
        connection.release();
        callback(null, rows[0]);
      }
    });
  });
}
</code></pre>

<p>Is this a good idea ? What should I do if I want to use promises for this kind of function ?
Thanks in advance for any help !!!</p>