【发布时间】:2018-08-06 06:40:02
【问题描述】:
我有一个这样的 JSON 条目,我需要将它输入到一个列中(称为值)
["Price Descending","Price Ascending","Name Ascending","Date Descending"]
如何将它输入到 json 列中,我正在尝试的是这个
$this->db->query("
INSERT INTO tag_sets (type, value) VALUES
('sorting_options', "
'Price Descending', 'Price Ascending', 'Name Ascending',
'Date Descending'";
");
这给了我一个错误,插入 json 列的正确方法是什么?
【问题讨论】:
-
我们需要知道错误是什么。
-
什么是“json 列”?是否要将 JSON 存储在一个数据库字段中?
-
@bart 是的,先生,是的
-
我得到语法错误
标签: php json postgresql codeigniter