Return the query when an error occurs

suggest change

You can attach the query executed to your err object when an error occurs:

var q = mysql.query('SELECT `name` FROM `pokedex` WHERE `id` = ?', [ 25 ], function (err, result) {if (err) {// Table 'test.pokedex' doesn't existerr.query = q.sql; // SELECT `name` FROM `pokedex` WHERE `id` = 25callback(err);}else {callback(null, result);}});

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


MySQL integration:
* Return the query when an error occurs

Table Of Contents
1 npm
7 MySQL integration
41 cli
43 grunt
59 Hack
64 ES6
67 Redis
69 MongoDB
86 MongoDB
87 Lodash
91 CORS
105 N-API
108 Require