I've a problem and I wish get your help to solve it.
Actually, I've an items Mysql table. And I have a characteristics column which is json datatype.
This is an example to explain what I'm saying.
- The table structure
CREATE TABLE item (
`id` INT(11) NOT NULL,
`name` VARCHAR(20) NOT NULL,
`characteristic` JSON NOT NULL
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
- The table data
INSERT INTO `item` (`id`, `name`, `characteristic`) VALUES
(3, 'Mouse', '[{\"name\": \"length\", \"value\": 6},
{\"name\": \"width\" , \"value\": 3},
{\"name\": \"height\", \"value\": 2}]'),
(4, 'Car' , '[{\"name\": \"length\", \"value\":11},
{\"name\": \"width\" , \"value\": 7},
{\"name\": \"height\", \"value\": 8}]');
So, I need to get all items which have the characteristic length > 10.
Many thanks in advance for your suggestions and help.