문제

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 ){
      ???
   }

});
도움이 되었습니까?

해결책

Execute the query:

SHOW WARNINGS

Here is more on SHOW WARNINGS Syntax

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top