How can I fetch the warnings after node-mysql queries
问题 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 ){ ??? } }); 回答1: Execute the query: SHOW WARNINGS Here is more on SHOW WARNINGS Syntax 来源: https://stackoverflow.com/questions/22962635/how-can-i-fetch-the-warnings-after-node-mysql-queries