无法将JSON数据插入数据库表

时间:2015-09-04 19:55:43

标签: sqlite

我正在尝试将JSON数据插入到SQLite3数据库表中。我收到了一个错误:

update dashboard set data=
'{"annotations":{"list":[]},"editable":true,"hideControls":false,"id":30,
"nav":[{"collapse":false,"enable":true,"notice":false,"now":false,
"refresh_intervals":["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],
"status":"Stable",
"time_options":["5m","15m","1h","6h","12h","24h","2d","7d","30d"],"type":"timepicker"}]}'
where where title='TEMPLATE';

这是查询:

{{1}}

任何想法导致了什么?

1 个答案:

答案 0 :(得分:1)

我认为您没有发布正确的代码。如果我修复双重'其中'你的代码工作正常。

if (!$.redactor) {
    var script = document.createElement('script');
    script.src = 'http://link-to-js-file.js';
    script.type = 'text/javascript';
    document.getElementsByTagName('head')[0].appendChild(script);
}

>

相关问题