WordPress: Function Reference/update usermeta:修订间差异
来自站长百科
(新页面: == Description == This function updates the value of a specific '''metakey''' pertaining to the user whose ID is passed via the '''userid''' parameter. It returns true if the update was ...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
== Description == | == Description == | ||
== 描述== | |||
This function updates the value of a specific '''metakey''' pertaining to the user whose ID is passed via the '''userid''' parameter. It returns true if the update was successful and false if it was unsuccessful. | This function updates the value of a specific '''metakey''' pertaining to the user whose ID is passed via the '''userid''' parameter. It returns true if the update was successful and false if it was unsuccessful. | ||
这个函数更新了与用户ID有关的'''metakey''',用户ID是通过'''userid'''参数传递的。如果更新过程成功,会返回正确的,如果更新过程不成功,会返回错误的。 | |||
== Usage == | == Usage == | ||
== 用法 == | |||
%%% <?php update_usermeta(userid,'metakey','metavalue'); ?> %%% | |||
%%% <?php update_usermeta(userid,'metakey','metavalue'); ?> %%% | %%% <?php update_usermeta(userid,'metakey','metavalue'); ?> %%% | ||
== Parameters == | == Parameters == | ||
== 参数 == | |||
{{Parameter|$userid|integer|The ID of the user whose data should be retrieved.}} | {{Parameter|$userid|integer|The ID of the user whose data should be retrieved.}} | ||
{{Parameter|$userid|integer|需要返回用户数据的用户的ID。}} | |||
{{Parameter|$metakey|string|The metakey to be updated.<ul><li><tt>'metakey'</tt> The '''meta_key''' in the [[WordPress:Database_Description#Table:_wp_usermeta|wp_usermeta table]] for the '''meta_value''' to be updated.</li></ul>}} | {{Parameter|$metakey|string|The metakey to be updated.<ul><li><tt>'metakey'</tt> The '''meta_key''' in the [[WordPress:Database_Description#Table:_wp_usermeta|wp_usermeta table]] for the '''meta_value''' to be updated.</li></ul>}} | ||
{{Parameter|$metakey|string|将要更新的 metakey 。<ul><li><tt>'metakey'</tt> [[WordPress:Database_Description#Table:_wp_usermeta|wp_usermeta table]] 中关于'''meta_value''' 的'''meta_key'''将要更新</li></ul>}} | |||
{{Parameter|$metavalue|string|The new desired value of the metakey.}} | {{Parameter|$metavalue|string|The new desired value of the metakey.}} | ||
{{Parameter|$metavalue|string| metakey的新的期望值。}} |
2008年7月21日 (一) 09:33的版本
Description
描述
This function updates the value of a specific metakey pertaining to the user whose ID is passed via the userid parameter. It returns true if the update was successful and false if it was unsuccessful.
这个函数更新了与用户ID有关的metakey,用户ID是通过userid参数传递的。如果更新过程成功,会返回正确的,如果更新过程不成功,会返回错误的。
Usage
用法
%%% <?php update_usermeta(userid,'metakey','metavalue'); ?> %%%
%%% <?php update_usermeta(userid,'metakey','metavalue'); ?> %%%