I am using the below to read a select statement that I am trying to pass to
another function, how can I get select_statement to return into a string so
I can use it just like sql_file in the below? I am new to js and I am not
sure I understand the structure yet but I am really stuck here!
fs = require('fs');
var sql_file = function(sql_file) {
var select_statement
fs.readFile("./SQLs/" + sql_file, "utf8", function(err,
select_statement) {
//console.log(select_statement);
return select_statement;
});
return sql_file;
console.log(select_statement);
return select_statement;
return test;
};
module.exports.sql_file = sql_file;
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.