admin管理员组文章数量:1201994
I need to store some post IDs in the DB in a custom table/field. The IDs will have to be stored in a serialized format. I know that, ie. for the options, serialization is done automatically for add/update functions (add_option()
, update_option()
). Is there a built-in WP function to serialize data for any other case? Or should I just use serialize()
? Similarly, as soon as the data will be retrieved, is there a stock WP function to unserialize it, or will I have to use unserialize()
? Thanks in advance for your replies!
I need to store some post IDs in the DB in a custom table/field. The IDs will have to be stored in a serialized format. I know that, ie. for the options, serialization is done automatically for add/update functions (add_option()
, update_option()
). Is there a built-in WP function to serialize data for any other case? Or should I just use serialize()
? Similarly, as soon as the data will be retrieved, is there a stock WP function to unserialize it, or will I have to use unserialize()
? Thanks in advance for your replies!
1 Answer
Reset to default 2WP functions...
Serialize: maybe_serialze
Unserialize: maybe_unserialize
本文标签: databaseSerialize data before inserting into the DB
版权声明:本文标题:database - Serialize data before inserting into the DB 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738568067a2100424.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论