Here is what I am talking about, look at return select_statement, I assign
it the data but ss still comes back!
var sql_file = function(value) {
var fileName = "./SQLs/inventory.sql";
var select_statement = "ss";
fs.exists(fileName, function(exists) {
if (exists) {
fs.stat(fileName, function(error, stats) {
fs.open(fileName, "r", function(error, fd) {
var buffer = new Buffer(stats.size);
fs.read(fd, buffer, 0, buffer.length, null,
function(error, bytesRead, buffer) {
var data = buffer.toString("utf8", 0,
buffer.length);
var select_statement = data;
//console.log(sq);
return select_statement
fs.close(fd);
});
});
});
}
});
--
--
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/groups/opt_out.