dongwu5801 2014-04-10 22:34
浏览 143

从wp_postmeta检索数据

I know this is maybe a dumb question. I am trying to retrieve data from the wordpress table wp_postmeta, specifically the meta_value column. Is there a function in php to get every field from that kind of data?

For example how can I get the "Gabriela Castro en Costa Rica" value from this

a:1:{s:14:"billing-seller";a:3:{s:4:"name";s:14:"billing-seller";s:5:"value";s:29:"Gabriela Castro en Costa Rica";s:5:"label";s:26:"Select one option, please.";}}

Thanks.

  • 写回答

3条回答 默认 最新

  • dongxiaoxiao1983 2014-04-10 22:35
    关注

    This seems like a serialized array, im not familiar with Wordpress but maybe try something like this:

    get_user_meta( '99999', 'your-key', true );
    

    You can find more information to get_user_meta here:

    https://wordpress.stackexchange.com/questions/9716/how-to-retrieve-the-value-stored-in-a-multi-dimensional-array-and-sum-the-entrie

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog