ZBlogPHP给某一指定数据表添加字段的代码

[db:摘要]

ZBlogPHP给某一指定数据表添加字段的代码在zblog应用开发中,我们时常会为一些数据表添加一些指定的字段,已变标记调用,那么该怎样实现呢?方法如下,以文章数据表zbp_post为例:function InstallPlugin_themeol()                                                                                                                                                                                                                          
{                                                                                                                                                                                                               
    global $zbp;                                                                                                                                             
    $zbp->db->QueryMulit("ALTER TABLE {$zbp->table['Post']} ADD COLUMN log_Themeol tinyint(1) not null default 0");   
}注释说明:$zbp->table['Post'] 文章数据表,log_Themeol 字段名,tinyint(1) 字段类型,not null default 0 默认值0

原创文章,作者:[db:作者],如若转载,请注明出处:https://008i.cn/15255.html