• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pdo_fieldexists函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中pdo_fieldexists函数的典型用法代码示例。如果您正苦于以下问题:PHP pdo_fieldexists函数的具体用法?PHP pdo_fieldexists怎么用?PHP pdo_fieldexists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pdo_fieldexists函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: requreSubscribe

function requreSubscribe()
{
    global $_W;
    $hasSubscribe = 1;
    if (isset($_W['fans']['from_user']) && !empty($_W['fans']['from_user'])) {
        $openid = $_W['fans']['from_user'];
        $userinfo = mc_fansinfo($openid);
        if (!$userinfo || $userinfo['follow'] == 0) {
            $hasSubscribe = 0;
        }
    } else {
        $oauthAccount = $_W['oauth_account'];
        if (empty($oauthAccount)) {
            message('未指定网页授权公众号, 无法获取用户信息.', '', 'error');
        }
        $userinfo = mc_oauth_userinfo();
        $level = pdo_fetchcolumn("SELECT `level` FROM " . tablename('account_wechats') . " WHERE `uniacid`=:uniacid", array(':uniacid' => $_W['uniacid']));
        if ($level == 4) {
            if ($userinfo['subscribe'] == 0) {
                $hasSubscribe = 0;
            }
        } else {
            $unionid = isset($userinfo['unionid']) ? $userinfo['unionid'] : '';
            if (empty($unionid)) {
                message('获取unionid失败,请确认公众号已接入微信开放平台', '', 'error');
            }
            $fieldsExist = pdo_fieldexists('mc_mapping_fans', 'unionid');
            if (!$fieldsExist) {
                pdo_query("ALTER TABLE " . tablename('mc_mapping_fans') . " ADD column unionid varchar(255) default null");
            }
            $openid = pdo_fetchcolumn("SELECT `openid` FROM " . tablename('mc_mapping_fans') . " WHERE `unionid`=:unionid AND `uniacid`=:uniacid ", array(':unionid' => $unionid, ':uniacid' => $_W['account']['uniacid']));
            if (empty($openid)) {
                $hasSubscribe = 0;
            } else {
                $userinfo = mc_fansinfo($openid);
                if (!$userinfo || $userinfo['follow'] == 0) {
                    $hasSubscribe = 0;
                }
            }
        }
    }
    return array('openid' => $openid, 'subscribe' => $hasSubscribe);
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:43,代码来源:zqgame.inc.php


示例2: pdo_query

}
if (!pdo_fieldexists('weishare', 'background')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `background` varchar(100) NOT NULL COMMENT '背景颜色';");
}
if (!pdo_fieldexists('weishare', 'tip')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `tip` varchar(100) NOT NULL COMMENT '提示语';");
}
if (!pdo_fieldexists('weishare', 'copyright')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `copyright` varchar(100) NOT NULL COMMENT '版权' ;");
}
if (!pdo_fieldexists('weishare', 'cardname')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `cardname` varchar(100) NOT NULL COMMENT '卡片名称' ;");
}
if (!pdo_fieldexists('weishare', 'unit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `unit` varchar(100) NOT NULL COMMENT '单位' ;");
}
if (!pdo_fieldexists('weishare', 'helplimit')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `helplimit` int(11) NOT NULL  COMMENT '每天助力限制次数';");
}
if (!pdo_fieldexists('weishare', 'limittype')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD `limittype` int(1) NOT NULL  COMMENT '限制类型' ;");
}
if (!pdo_fieldexists('weishare_firend', 'sid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_firend') . " ADD `sid` int(10) NOT NULL DEFAULT '0' ;");
}
if (!pdo_fieldexists('weishare', 'endtime')) {
    pdo_query("ALTER TABLE " . tablename('weishare') . " ADD endtime\tint(11) unsigned NOT NULL COMMENT '日期' ;");
}
if (!pdo_fieldexists('weishare_setting', 'weid')) {
    pdo_query("ALTER TABLE " . tablename('weishare_setting') . " ADD weid INT(11) UNSIGNED DEFAULT NULL ;");
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:upgrade.php


示例3: implode

        }
    }
    $titles = implode("+", $titles);
    pdo_update("shopping_goods_option", array("title" => $titles), array("id" => $o['id']));
    pdo_update("shopping_order_goods", array("optionname" => $titles), array("optionid" => $o['id']));
}
//字段长度
if (pdo_fieldexists('shopping_goods', 'thumb')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE `thumb` `thumb` varchar(255) DEFAULT '';");
}
if (!pdo_fieldexists('shopping_goods', 'spec')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `spec` varchar(5000) NOT NULL DEFAULT '';");
}
if (!pdo_fieldexists('shopping_goods', 'originalprice')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD `originalprice` DECIMAL(10, 2) NOT NULL DEFAULT '0.00' COMMENT '原价' AFTER `costprice`;");
}
if (!pdo_fieldexists('shopping_order', 'paydetail')) {
    pdo_query("ALTER TABLE " . tablename('shopping_order') . " ADD  `paydetail` varchar(255) NOT NULL COMMENT '支付详情';");
}
if (pdo_fieldexists('shopping_goods', 'total')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE  `total`   `total` int(10) unsigned NOT NULL DEFAULT '0';");
}
if (pdo_fieldexists('shopping_goods', 'credit')) {
    pdo_query("ALTER TABLE  " . tablename('shopping_goods') . " CHANGE  `credit`  `credit` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if (!pdo_fieldexists('shopping_goods', 'usermaxbuy')) {
    pdo_query("ALTER TABLE " . tablename('shopping_goods') . " ADD   `usermaxbuy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户最多购买数量';");
}
if (!pdo_fieldexists('shopping_order', 'address')) {
    pdo_query("ALTER TABLE " . tablename('shopping_order') . " ADD   `address` varchar(1024) NOT NULL DEFAULT '' COMMENT '收货地址信息';");
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:upgrade.php


示例4: pdo_query

<?php

if (!pdo_fieldexists('egg_reply', 'periodlottery')) {
    pdo_query("ALTER TABLE `ims_egg_reply` ADD `periodlottery` SMALLINT( 10 ) UNSIGNED NOT NULL DEFAULT '1' COMMENT '0������';");
}
if (pdo_fieldexists('egg_award', 'activation_code')) {
    pdo_query("ALTER TABLE " . tablename('egg_award') . " CHANGE `activation_code` `activation_code` text;");
}
开发者ID:nsoff,项目名称:wdlcms,代码行数:8,代码来源:upgrade.php


示例5: tablename

<?php

if (!pdo_fieldexists('wxwall_reply', 'logo')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `logo` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `isshow`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `background` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `logo`;");
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:6,代码来源:upgrade.php


示例6: tablename

<?php

/*
*/
if (!pdo_fieldexists('feng_wechat', 'win_mess')) {
    pdo_query("ALTER TABLE " . tablename('feng_wechat') . " ADD `win_mess` varchar(200) DEFAULT NULL;");
}
开发者ID:6662680,项目名称:qday_wx,代码行数:7,代码来源:upgrade.php


示例7: tablename

<?php

/**
 */
if (!pdo_fieldexists('weihaom_wb_reply', 'uniacid')) {
    pdo_query("ALTER TABLE " . tablename('weihaom_wb_reply') . " ADD   `uniacid` int(10) unsigned NOT NULL;");
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:7,代码来源:upgrade.php


示例8: pdo_delete

            pdo_delete('rule', "id IN ('" . implode("','", $deleteid) . "')");
        }
        $subaccount = pdo_fetchall("SELECT acid FROM " . tablename('account') . " WHERE uniacid = :uniacid", array(':uniacid' => $uniacid));
        if (!empty($subaccount)) {
            foreach ($subaccount as $account) {
                @unlink(IA_ROOT . '/attachment/qrcode_' . $account['acid'] . '.jpg');
                @unlink(IA_ROOT . '/attachment/headimg_' . $account['acid'] . '.jpg');
            }
        }
        $tables = pdo_fetchall("SHOW TABLES;");
        foreach ($tables as $table) {
            $tablename = str_replace($GLOBALS['_W']['config']['db']['tablepre'], '', array_shift($table));
            if (pdo_fieldexists($tablename, 'uniacid')) {
                pdo_delete($tablename, array('uniacid' => $uniacid));
            }
            if (pdo_fieldexists($tablename, 'weid')) {
                pdo_delete($tablename, array('weid' => $uniacid));
            }
        }
    }
    message('公众帐号信息删除成功!', url('account/batch'), 'success');
} elseif ($do == 'group') {
    if (!$_GPC['accountarr']) {
        message('您没有选择要操作的公众号');
    }
    $isexpire = intval($_GPC['isexpire']);
    $endtime = strtotime($_GPC['endtime']);
    if ($isexpire && $endtime <= TIMESTAMP) {
        message('套餐过期时间必须大于当前时间');
    }
    $groupid = intval($_GPC['groupid']);
开发者ID:legeng,项目名称:project-2,代码行数:31,代码来源:batch.ctrl.php


示例9: varchar

      `mediaid` varchar(255) DEFAULT \'\',
      `ticket` varchar(250) NOT NULL,
      `url` varchar(80) NOT NULL,
      `createtime` int(10) unsigned NOT NULL,
      `goodsid` int(11) DEFAULT \'0\',
      `qrimg` varchar(1000) DEFAULT \'\',
      PRIMARY KEY (`id`),
      KEY `idx_acid` (`acid`),
      KEY `idx_sceneid` (`sceneid`),
      KEY `idx_type` (`type`),
      FULLTEXT KEY `idx_openid` (`openid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;';
    $sql = 'CREATE TABLE  IF NOT EXISTS  ' . tablename('ewei_shop_poster_scan') . ' (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `uniacid` int(11) DEFAULT \'0\',
      `posterid` int(11) DEFAULT \'0\',
      `openid` varchar(255) DEFAULT \'\',
      `from_openid` varchar(255) DEFAULT \'\',
      `scantime` int(11) DEFAULT \'0\',
      PRIMARY KEY (`id`),
      KEY `idx_uniacid` (`uniacid`),
      KEY `idx_posterid` (`posterid`),
      KEY `idx_scantime` (`scantime`),
      FULLTEXT KEY `idx_openid` (`openid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;';
    pdo_query($sql);
}
if (!pdo_fieldexists('ewei_shop_poster', 'paytype')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_shop_poster') . ' ADD `paytype` tinyint(1) DEFAULT \'0\';');
}
pdo_update('ewei_shop_plugin', array('version' => 1.1), array('identity' => 'poster'));
开发者ID:noikiy,项目名称:mygit,代码行数:31,代码来源:init.php


示例10: pdo_query

<?php

if (!pdo_fieldexists('wxwall_reply', 'logo')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `logo` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `isshow`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `background` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `logo`;");
    pdo_query("ALTER TABLE " . tablename('wxwall_reply') . " ADD `acid` INT NOT NULL AFTER `id`;");
}
if (!pdo_fieldexists('wxwall_members', 'avatar')) {
    pdo_query("ALTER TABLE " . tablename('wxwall_members') . " ADD  `avatar` varchar(255) NOT NULL COMMENT '粉丝头像';");
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:10,代码来源:upgrade.php


示例11: tablename

<?php

if (!pdo_fieldexists('ewei_dream_oversee', 'fansid')) {
    pdo_query("ALTER TABLE " . tablename('ewei_dream_oversee') . " ADD `fansid` int(11) NOT NULL DEFAULT '0';");
}
开发者ID:aspnmy,项目名称:weizan,代码行数:5,代码来源:upgrade.php


示例12: pdo_query

}
if (!pdo_fieldexists('ewei_shop_goods', 'followurl')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_goods') . " ADD  `followurl` varchar(255) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_goods', 'deduct')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_goods') . " ADD  `deduct` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_member', 'agentselectgoods')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_member') . " ADD    `agentselectgoods` tinyint(3) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'verifytime')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD   `verifytime` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'verifystoreid')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD   `verifystoreid` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductprice')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductprice` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductcredit')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductcredit` int(11) DEFAULT '0';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductcredit2')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductcredit2` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_order', 'deductenough')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_order') . " ADD    `deductenough` decimal(10,2) DEFAULT '0.00';");
}
if (!pdo_fieldexists('ewei_shop_plugin', 'status')) {
    pdo_query("ALTER TABLE " . tablename('ewei_shop_plugin') . " ADD    `status` tinyint(3) DEFAULT '0';");
}
开发者ID:noikiy,项目名称:mygit,代码行数:31,代码来源:upgrade.php


示例13: pdo_query

<?php

if (!pdo_fieldexists('research', 'pretotal')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `pretotal` INT( 10 ) UNSIGNED NOT NULL DEFAULT '1';");
}
//pdo_query("ALTER TABLE `ims_research` CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';");
if (!pdo_fieldexists('research', 'noticeemail')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `noticeemail` VARCHAR( 50 ) NOT NULL DEFAULT '';");
}
if (!pdo_fieldexists('research', 'endtime')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `endtime` INT( 10 ) UNSIGNED NOT NULL ;");
}
if (!pdo_fieldexists('research', 'content')) {
    pdo_query("ALTER TABLE " . tablename('research') . " CHANGE `description` `content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `description` VARCHAR( 1000 ) NOT NULL DEFAULT '' AFTER `title` ;");
}
if (!pdo_fieldexists('research', 'status')) {
    pdo_query("ALTER TABLE " . tablename('research') . " ADD `status` VARCHAR(1)  NULL DEFAULT '';");
}
开发者ID:alextiannus,项目名称:wormwood_wechat,代码行数:19,代码来源:upgrade.php


示例14: pdo_query

}
if (!pdo_fieldexists('brand_reply', 'news_content')) {
    pdo_query("ALTER TABLE " . tablename('brand_reply') . " ADD `news_content` VARCHAR(500) NOT NULL;");
}
if (!pdo_fieldexists('brand', 'btnName')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName VARCHAR(20) DEFAULT NUL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'showMsg')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD showMsg INT(1) DEFAULT 0 ;");
}
if (!pdo_fieldexists('brand', 'btnName1')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName1 VARCHAR(20) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl1')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl1 VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnName2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnName2 VARCHAR(20) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'btnUrl2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD btnUrl2 VARCHAR(100) DEFAULT NULL ;");
}
if (!pdo_fieldexists('brand', 'intro2')) {
    pdo_query("ALTER TABLE " . tablename('brand') . " ADD intro2 VARCHAR(500) NOT NULL ;");
}
if (!pdo_fieldexists('brand_message', 'address')) {
    pdo_query("ALTER TABLE " . tablename('brand_message') . " ADD address VARCHAR(200) NOT NULL ;");
}
开发者ID:aspnmy,项目名称:weizan,代码行数:31,代码来源:upgrade.php


示例15: pdo_query

 * DELIMITER //
 * CREATE PROCEDURE schema_add() BEGIN
 * DECLARE CurrentDatabase VARCHAR(100);
 * SELECT DATABASE() INTO CurrentDatabase;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_users_profile' AND column_name = 'jd_account') THEN
 * ALTER TABLE `ims_users_profile` ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号';
 * END IF;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_mc_members' AND column_name = 'jd_account') THEN
 * ALTER TABLE `ims_mc_members` ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号';
 * END IF;
 * IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema=CurrentDatabase AND table_name = 'ims_mc_members' AND column_name = 'modifytime') THEN
 * ALTER TABLE `ims_mc_members` ADD `modifytime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间';
 * END IF;
 * END;//
 * DELIMITER ;
 * CALL schema_add();
 * INSERT INTO `ims_profile_fields`(field,available, title,description,displayorder,required,unchangeable,showinregister) SELECT 'jd_account', '1', '京东帐号', '', '0', '0', '0', '1' FROM DUAL WHERE NOT EXISTS(SELECT `field` FROM `ims_profile_fields` WHERE `field` = 'jd_account');"
 */
if (!pdo_fieldexists('users_profile', 'jd_account')) {
    pdo_query("ALTER TABLE " . table('users_profile') . " ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号'");
}
if (!pdo_fieldexists('mc_members', 'jd_account')) {
    pdo_query("ALTER TABLE " . table('mc_members') . " ADD `jd_account` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '无' COMMENT '京东账号'");
}
if (!pdo_fieldexists('mc_members', 'modifytime')) {
    pdo_query("ALTER TABLE " . table('mc_members') . " ADD `modifytime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改时间'");
}
if (empty(pdo_fetch('SELECT field,title FROM ' . tablename('profile_fields') . ' WHERE field = :field', array(':field' => 'jd_account')))) {
    $data = array('field' => 'jd_account', 'available' => '1', 'title' => '京东帐号', 'description' => '', 'displayorder' => '0', 'required' => '0', 'unchangeable' => '0', 'showinregister' => '1');
    pdo_insert('profile_fields', $data);
}
开发者ID:dalinhuang,项目名称:urWq,代码行数:31,代码来源:init.php


示例16: pdo_query

//0731
if (!pdo_fieldexists('fm_photosvote_reply', 'fansmostvote')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD   `fansmostvote` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户最高投票数';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'mtemplates')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD  `mtemplates` varchar(500) NOT NULL COMMENT '模板ID';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'huodong')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `huodong` varchar(500) NOT NULL COMMENT '活动';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'command')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD   `command` varchar(10) NOT NULL COMMENT '报名命令';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'istop')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD  `istop` varchar(300) NOT NULL COMMENT '顶部设置';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'isid')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `isid` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'isid';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'hhhdpicture')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD      `hhhdpicture` varchar(150) NOT NULL COMMENT '会话活动图片';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'iplocallimit')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `iplocallimit` varchar(100) NOT NULL COMMENT '地区限制';");
}
if (!pdo_fieldexists('fm_photosvote_reply', 'iplocaldes')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_reply') . " ADD    `iplocaldes` varchar(100) NOT NULL COMMENT '地区限制';");
}
if (!pdo_fieldexists('fm_photosvote_provevote', 'ysid')) {
    pdo_query("ALTER TABLE " . tablename('fm_photosvote_provevote') . " ADD   `ysid` int(10) unsigned NOT NULL COMMENT 'ysid';");
}
开发者ID:6662680,项目名称:qday_wx,代码行数:31,代码来源:upgrade.php


示例17: pdo_fieldexists

<?php

/**
 * 游戏设置
 *
 * @version     $Id: settings.inc.php 1 18:42 2015年09月15日Z lions $
 * @copyright   Copyright (c) 2013 - 2020, haobama.net, Inc.
 * @link        http://www.haobama.net
 */
global $_W, $_GPC;
if (isset($_GPC['item']) && $_GPC['item'] == 'ajax' && $_GPC['key'] == 'require') {
    $data['uniacid'] = $_W['uniacid'];
    $data['setting_key'] = 'require_subscribe';
    $data['setting_value'] = $_GPC['require'] == 1 ? 1 : 0;
    if ($data['setting_value'] == 1) {
        $fieldsExist = pdo_fieldexists('mc_mapping_fans', 'unionid');
        if (!$fieldsExist) {
            pdo_query("ALTER TABLE " . tablename('mc_mapping_fans') . " ADD column unionid varchar(255) default null");
        }
    }
    pdo_query("DELETE FROM " . tablename('lions_zq_settings') . " WHERE `uniacid`=:uniacid AND `setting_key`='require_subscribe'", array(':uniacid' => $_W['uniacid']));
    pdo_insert('lions_zq_settings', $data);
    echo pdo_insertid();
    exit;
} elseif (isset($_GPC['item']) && $_GPC['item'] == 'ajax' && $_GPC['key'] == 'thumb') {
    $data['uniacid'] = $_W['uniacid'];
    $data['setting_key'] = 'thumb';
    $data['setting_value'] = $_GPC['thumb'];
    pdo_query("DELETE FROM " . tablename('lions_zq_settings') . " WHERE `uniacid`=:uniacid AND `setting_key`='thumb'", array(':uniacid' => $_W['uniacid']));
    pdo_insert('lions_zq_settings', $data);
    echo pdo_insertid();
开发者ID:eduNeusoft,项目名称:weixin,代码行数:31,代码来源:settings.inc.php


示例18: exit

<?php

if (!defined('IN_IA')) {
    exit('Access Denied');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'taotaoid')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `taotaoid` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'taobaourl')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `taobaourl` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'updatetime')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `updatetime` int(11) default 0;');
}
if (!pdo_fieldexists('ewei_dshop_goods', 'updatetime')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods') . ' ADD `updatetime` int(11) default 0;');
}
if (!pdo_fieldexists('ewei_dshop_goods_option', 'skuId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_option') . ' ADD `skuId` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods_spec', 'propId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_spec') . ' ADD `propId` varchar(255) DEFAULT \'\';');
}
if (!pdo_fieldexists('ewei_dshop_goods_spec_item', 'valueId')) {
    pdo_query('ALTER TABLE ' . tablename('ewei_dshop_goods_spec_item') . ' ADD `valueId` varchar(255) DEFAULT \'\';');
}
开发者ID:noikiy,项目名称:mygit,代码行数:26,代码来源:init.php


示例19: pdo_query

<?php

if (!pdo_fieldexists('wwx_sign', 'new_title')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_title` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign', 'copyright')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `copyright` varchar(200) ;");
}
if (!pdo_fieldexists('wwx_sign', 'new_icon')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_icon` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign', 'new_content')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign') . "ADD  `new_content` varchar(200);");
}
if (!pdo_fieldexists('wwx_sign_award', 'serial_day')) {
    pdo_query("ALTER TABLE " . tablename('wwx_sign_award') . "ADD  serial_day int(10) ;");
}
/**
* links
*/
$sql = "\r\nCREATE TABLE IF NOT EXISTS " . tablename('wwx_sign_link') . " (\r\n`id` int(10) unsigned NOT NULL AUTO_INCREMENT,\r\n`sid` INT(11) UNSIGNED DEFAULT NULL,\r\n`sort` int(2) default 0,\r\n`link_name` varchar(50) NOT NULL ,\r\n`link_url` varchar(50) NOT NULL,\r\n`createtime` int(10) unsigned NOT NULL COMMENT '日期',\r\n PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8";
pdo_query($sql);
开发者ID:ChainBoy,项目名称:wxfx,代码行数:22,代码来源:upgrade.php


示例20: VARCHAR

<?php

if (!pdo_fieldexists('mbrp_activities', 'banner')) {
    pdo_run("ALTER TABLE `ims_mbrp_activities` ADD `banner` VARCHAR(500) NOT NULL DEFAULT '';");
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:5,代码来源:upgrade.php



注:本文中的pdo_fieldexists函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP pdo_get函数代码示例发布时间:2022-05-15
下一篇:
PHP pdo_fetchcolumn函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap