numtel / meteor-mysql

Reactive MySQL for Meteor
MIT License
343 stars 41 forks source link

How can insert or update new row ? #55

Open khiemnm opened 8 years ago

khiemnm commented 8 years ago

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

Twisterking commented 8 years ago

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
});
zceolrj commented 7 years ago

can new LiveMysql() run at the client side?