当我想插入一个字符串数组时,我使用了INSERT INTO table (json_column) VALUES ("['item1','item2','item3']"),我得到了一个错误提示:3140- Invalid JSON text: "Invalid value." at position 1 in value for column 'test.names'.我该怎么办?
我想在mysql表中插入一个数组。该数组是通过脚本扫描所有链接,转换为绝对链接,然后在数组中显示它们而生成的。我决定将数组mysql_query到表中,但现在我被卡住了。它只发送“array”,而不是将数组中的每一行都发送到不同的行。有什么想法吗??!
<?("xxxx", "xxxx", "xxx") or
最初,我尝试使用mySQL,但这有点困难,所以我决定切换到JSON文件。JSON file, create new one and push encoded array into fileunlink($json_file$json_file);
fwrite($handle, $json_string) or die('Internal Sever Erro