标签: mysql node.js error-handling node-mysql
如何在查询执行后获取相应的警告,如:
connection.query( squery, function(err, rows){ ... // search for OkPacket in 2 dimension array var warningCounter = okPacket.warningCount; if ( warningCounter > 0 ){ ??? } });
答案 0 :(得分:1)
执行查询:
SHOW WARNINGS
以下是 SHOW WARNINGS Syntax