首页 > 数据库 > > mysql写过程解析json数组
现在有字段price,格式:[json格式,json格式,……]
使用查询语句:
select json_length(price) from product where id = (SELECT id from product LIMIT 2,1); 语句不报错。
但把语句放到进程里,就报price格式错误:Invalid JSON text in argument 1 to function json_length: "Incorrect hex digit after \u escape in string." at position 499.
求大神解惑。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/717/viewspace-3143820/ ,如需转载,请注明出处,否则将追究法律责任。