可以在javascriptl中使用mysql吗?

时间:2016-04-12 00:23:13

标签: javascript mysql

我知道你不能直接将它们一起使用。我怎么能一起使用它们呢?

1 个答案:

答案 0 :(得分:1)

Yes, it's possible if you're running JavaScript server-side (such as with node.js). This won't be possible directly with client-side JavaScript, however (i.e., in a web-browser). For that, you'd have to add an extra communication layer such as a REST web service to send your data from the browser and persist it on a server running MySQL.