meteor-mysql icon indicating copy to clipboard operation
meteor-mysql copied to clipboard

How can insert or update new row ?

Open khiemnm opened this issue 9 years ago • 2 comments

Hi Numtel. I see your demo, we can show data from mysql db. But quick question. How can insert or update new row like Mongo.insert? Thank you

khiemnm avatar Dec 06 '15 03:12 khiemnm

For updating or inserting use the node-mysql connection exposed on the LiveMysql.db property.

liveDb = new LiveMysql(sqlsettings);
liveDb.db.query("INSERT INTO ...", (err, res) => {
    // do something
});

Twisterking avatar Dec 14 '15 10:12 Twisterking

can new LiveMysql() run at the client side?

zceolrj avatar Oct 08 '16 15:10 zceolrj