I'm new to node js when i try to execute the below program am getting an exception as
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : 'Gemini*123',
database : 'test'
});
connection.connect();
var queryString = "select * user_details";
connection.query(queryString, function(err, rows, fields) {
if (err) throw err;
for (var i in rows) {
console.log('Post Titles: ', rows[i].user_name);
}
});
connection.end();
"Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_details' at line 1"?
Thanks