Can JavaScript connect with MySQL?

前端 未结 19 2009
小鲜肉
小鲜肉 2020-11-22 16:18

Can JavaScript connect with MySQL? If so, how?

19条回答
  •  -上瘾入骨i
    2020-11-22 17:00

    YES? Have a look a meteor. Links:

    http://meteor.com/screencast and http://net.tutsplus.com/tutorials/javascript-ajax/whats-this-meteor-thing/

    I don't understand how it is done. But Nettuts+ put this thing in the javascript-ajax section, maybe magic happens.

    It also shows some way to connect and insert to MongoDB with JS, like this:

    Products.insert({Name : "Hammer", Price : 4.50, InStock : true});
    Products.insert({Name : "Wrench", Price : 2.70, InStock : true});
    Products.insert({Name : "Screw Driver", Price : 3.00, InStock : false});
    Products.insert({Name : "Drill", Price : 5.25, InStock : true});
    

提交回复
热议问题