mysql从另一列的序列化键值更新列

时间:2017-11-17 20:22:15

标签: mysql

我有一个名为"_ait-item_item-data"的mysql列,其值如此

a:30:{s:8:"subtitle";s:0:"";s:12:"featuredItem";s:1:"1";s:10:"headerType";s:3:"map";s:11:"headerImage";s:0:"";s:16:"headerImageAlign";s:0:"";s:3:"map";a:7:{s:7:"address";s:43:"527 2nd Avenue, South Charleston, WV, 25303";s:8:"latitude";d:38.36640390000000166992322192527353763580322265625;s:9:"longitude";d:-81.688525499999997236955096013844013214111328125;s:10:"streetview";i:1;s:9:"swheading";s:0:"";s:7:"swpitch";s:0:"";s:6:"swzoom";s:0:"";}s:9:"telephone";s:0:"";s:19:"telephoneAdditional";s:0:"";s:5:"email";s:0:"";s:9:"showEmail";s:1:"1";s:15:"contactOwnerBtn";s:1:"1";s:3:"web";s:68:"http://pyramidcounselingllc.com/south-charleston-wv-location/5100852";s:12:"webLinkLabel";s:0:"";}

我想使用经度&更新2个其他mysql列,"ait-latitude""ait-longitude" laitutde来自上面的序列化值

我知道标准类型列的mysql查询就像

UPDATE table SET ait-latitude = _ait-item_item-data WHERE id = 1

我无法理解如何从序列化数组中获取值。

0 个答案:

没有答案