javascript - Get last inserted id from Sequelize.js "query" (MySQL) -


i'm using sequelize in 1 of projects , having trouble custom non-model query.

for example:

var query = "insert table (name) values ("bob");"; sqlcon.query(query)     .on('success', function(result) {         console.log(result); // no inserted record or last insert id     }); 

i have inserted record returned me in case or @ least record id. missing make sure "result" gets populated?

try this:

var sequelize = new sequelize('testa', 'testa', 'testa', {   dialect: 'mysql',   dialectoptions: {     flags: '-found_rows'   } }); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -