私は次のSQLを持っています:
tbl_items
title extra_fields
Prod1 [{"id":"2","value":"1"},{"id":"3","value":"1"},{"id":"4","value":"2"}]
Prod2 [{"id":"2","value":"1"},{"id":"3","value":"2"},{"id":"4","value":"1"}]
Prod3 [{"id":"2","value":"2"},{"id":"3","value":"2"},{"id":"4","value":"1"}]
Prod4 [{"id":"2","value":"2"},{"id":"3","value":"1"},{"id":"4","value":"1"}]
Prod5 [{"id":"2","value":"2"},{"id":"3","value":"1"}]
Prod6 [{"id":"2","value":"1"},{"id":"3","value":"1"}]
Prod7 [{"id":"2","value":"1"},{"id":"3","value":"1"},{"id":"4","value":"1"}]
Prod8 [{"id":"2","value":"1"},{"id":"3","value":"1"}]
今、私{"id":"2","value":"2"};
が使用している値を含むすべての製品を選択したいjoomla cms
..次のステートメントを試しました:
$db->setQuery('SELECT * FROM tbl_items WHERE extra_fields LIKE "%{"id":"2","value":"2"}%"');
$xFields = $db->loadObjectList();
しかし、それは私にはうまくいきません。誰か助けてもらえますか?