TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
durgaprasad rapolu
NA
57
8.8k
Is it possible local variable value store as a instance var
Apr 22 2019 6:31 AM
Hi i want to display the function value to outside of the function only using variables.
I have a sql query function. I am getting the one value and stored in a variable. Now i want to this value stored in instance variable and display.
Note: I dont want using another function. only local variable value stored as a instance varible .Ho to solve this.
Iam using node.js code ::
if (intent.intent==='Sales-1'){
var rsp;
con.query('SELECT Mobiles from Salestb' , function (err,rows,field) {
if(err) {
throw err;
} else {
var value = (rows[0].Mobiles);
rsp =value;
}
});
console.log(rsp);
}
Reply
Answers (
1
)
How to return the value out side of the query function nodjs
Why do we need Node.js for Angular application?