node.js - passing in and out parameter to a mysql stored procedure and return the out parameter in the nodejs code -
create definer=`root`@`%` procedure `countorderbystatus`( in orderstatus varchar(50), out total int) begin select count(ordernumber) total orders status = orderstatus; end
this stored procedure. want out parameter total
's value in nodejs application
db_ask.query(("set @a = 0; phone call countorderbystatus('" + _orderstatus + "', @a); select @a;"),function(err, results){ //process result });
assuming db_ask connection mysql db .
have nice day, alex.
mysql node.js
No comments:
Post a Comment