Reputation: 1470
How can I fetch the corresponding warning identified after the query execution as in:
connection.query( squery, function(err, rows){
...
// search for OkPacket in 2 dimension array
var warningCounter = okPacket.warningCount;
if ( warningCounter > 0 ){
???
}
});
Upvotes: 3
Views: 3202
Reputation: 1949
Execute the query:
SHOW WARNINGS
Here is more on SHOW WARNINGS Syntax
Upvotes: 2