admin管理员组文章数量:1134243
I am trying to count all birth years, months and days separately using get_results. I can also print them.
$wpdb->get_results("SELECT * FROM {$userـmeta} WHERE `meta_key` = 'birthday' ")
output:
Array
(
[0] => stdClass Object
(
[umeta_id] => 134
[user_id] => 1
[meta_key] => birthday
[meta_value] => a:3:{s:4:"year";s:4:"1920";s:5:"month";s:1:"6";s:3:"day";s:2:"16";}
)
[1] => stdClass Object
(
[umeta_id] => 172
[user_id] => 4
[meta_key] => birthday
[meta_value] => a:3:{s:4:"year";s:4:"1952";s:5:"month";s:1:"3";s:3:"day";s:2:"14";}
)
[2] => stdClass Object
(
[umeta_id] => 279
[user_id] => 8
[meta_key] => birthday
[meta_value] => a:3:{s:4:"year";s:4:"1999";s:5:"month";s:1:"4";s:3:"day";s:2:"13";}
)
[3] => stdClass Object
(
[umeta_id] => 284
[user_id] => 5
[meta_key] => birthday
[meta_value] => a:3:{s:4:"year";s:4:"2015";s:5:"month";s:1:"3";s:3:"day";s:1:"9";}
)
[4] => stdClass Object
(
[umeta_id] => 289
[user_id] => 6
[meta_key] => birthday
[meta_value] => a:3:{s:4:"year";s:4:"1945";s:5:"month";s:1:"2";s:3:"day";s:2:"17";}
)
)
本文标签: count and echo json format wordpress database
版权声明:本文标题:count and echo json format wordpress database 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736849278a1955429.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论