本文整理汇总了PHP中db_factory::inserttable方法的典型用法代码示例。如果您正苦于以下问题:PHP db_factory::inserttable方法的具体用法?PHP db_factory::inserttable怎么用?PHP db_factory::inserttable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_factory
的用法示例。
在下文中一共展示了db_factory::inserttable方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUpid
public static function getUpid($nameone)
{
$districtinfo = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_district where name="' . $nameone . '"');
if ($districtinfo) {
$twoupid = $districtinfo['id'];
} else {
$insertsqlarr['name'] = $nameone;
$insertsqlarr['upid'] = "0";
$intResult = db_factory::inserttable(TABLEPRE . 'witkey_district', $insertsqlarr);
$twoupid = $intResult;
}
return $twoupid;
}
示例2: foreach
foreach ($arrIndusC as $k => $v) {
$arrNewIndusC[$v['indus_pid']][] = $v;
}
}
if (isset($ky)) {
$ky = htmlspecialchars($ky);
$ky = kekezu::escape($ky);
$arrHwStatus = db_factory::query("select v from " . TABLEPRE . "witkey_basic_config where k='hot_words_status'");
$arrUpdateStatus = db_factory::query("select v from " . TABLEPRE . "witkey_basic_config where k='update_status'");
$arrSearch = db_factory::query("select * from " . TABLEPRE . "witkey_hotwords where words = '{$ky}'");
if ($arrHwStatus[0]['v'] == 'open') {
if ($arrUpdateStatus[0]['v'] == 'auto') {
if (count($arrSearch)) {
db_factory::updatetable(TABLEPRE . "witkey_hotwords", array('count' => $arrSearch[0]['count'] + 1, 'time' => time()), array('words' => $arrSearch[0]['words']));
} else {
db_factory::inserttable(TABLEPRE . "witkey_hotwords", array('words' => $ky, 'time' => time(), 'auto' => '1'));
}
} else {
if (count($arrSearch)) {
db_factory::updatetable(TABLEPRE . "witkey_hotwords", array('count' => $arrSearch[0]['count'] + 1, 'time' => time()), array('words' => $arrSearch[0]['words'], 'auto' => '0'));
}
}
}
}
$arrPayitemConfig = keke_payitem_class::get_payitem_config(null, null, null, 'item_id');
$arrIndusAll = $kekezu->_indus_arr;
$arrModelLabel = array(0 => '未知', 1 => '单人', 2 => '多人', 3 => '计件', 4 => '招标', 5 => '订金', 6 => '文件', 7 => '服务');
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = intval($intPagesize) ? $intPagesize : 10;
$strSql = "select a.*,substring(payitem_time,instr(a.payitem_time,'top')+4+LENGTH('top'),10) as top_time\n\t\t from " . TABLEPRE . "witkey_service as a where ";
示例3: foreach
}
}
if ($msgConfigsTpl) {
foreach ($msgConfigsTpl as $k => $v) {
$insertsqlarr = array();
$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($msgConfigsTpl[$k]['content'])) : '';
$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'] ? str_replace(array('task_id='), array('id='), $msgConfigsTpl[$k]['content']) : '';
if ($k == 'get_password') {
$insertsqlarr['mobile_content'] = $insertsqlarr['content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($insertsqlarr['content'])) : $insertsqlarr['content'];
} else {
$insertsqlarr['mobile_content'] = $msgConfigsTpl[$k]['mobile_content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($msgConfigsTpl[$k]['mobile_content'])) : $insertsqlarr['content'];
}
$insertsqlarr['k'] = $msgConfigsTpl[$k]['k'];
$insertsqlarr['obj'] = $msgConfigsTpl[$k]['obj'];
$insertsqlarr['desc'] = $msgConfigsTpl[$k]['desc'];
$insertsqlarr['prompt'] = $msgConfigsTpl[$k]['prompt'];
$insertsqlarr['v'] = 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}';
$insertsqlarr['on_time'] = $msgConfigsTpl[$k]['on_time'];
//$insertsqlarr['content'] = $msgConfigsTpl[$k]['content'];
$insertsqlarr['send_type'] = $msgConfigsTpl[$k]['send_type'];
//$insertsqlarr['mobile_content'] = $msgConfigsTpl[$k]['mobile_content'];
$insertsqlarr['mobile'] = 0;
if (!in_array($k, $smsListsKeys)) {
db_factory::inserttable(TABLEPRE . 'witkey_msg_config', $insertsqlarr);
} else {
$wheresqlarr = array();
$wheresqlarr['k'] = $k;
db_factory::updatetable(TABLEPRE . 'witkey_msg_config', $insertsqlarr, $wheresqlarr);
}
}
}
示例4: save_feed
static function save_feed($feed_arr, $uid, $username, $feedtype = "", $obj_id = 0, $obj_link = "", $icon = '')
{
$title = serialize($feed_arr);
$insertsqlarr = array();
$insertsqlarr['icon'] = $icon;
$insertsqlarr['feed_time'] = time();
$insertsqlarr['feedtype'] = $feedtype;
$insertsqlarr['obj_link'] = $obj_link;
$insertsqlarr['obj_id'] = $obj_id;
$insertsqlarr['title'] = $title;
$insertsqlarr['uid'] = $uid;
$insertsqlarr['username'] = $username;
return db_factory::inserttable(TABLEPRE . 'witkey_feed', $insertsqlarr);
}
示例5: intval
<?php
$excite_uid and $intExciteUid = intval($excite_uid);
$excite_code and $strExciteCode = strval($excite_code);
$arrUserInfo = kekezu::get_user_info($intExciteUid);
if ($arrUserInfo) {
$strMd5Code = md5($arrUserInfo['uid'] . ',' . $arrUserInfo['username'] . ',' . $arrUserInfo['email']);
if ($arrUserInfo['status'] == '3') {
if ($strMd5Code == $strExciteCode) {
$intRes = db_factory::execute(sprintf("update %switkey_space set status='1' where uid='%d'", TABLEPRE, $intExciteUid));
if ($intRes) {
$arrAuthDatas = array('email_a_id' => null, 'uid' => $arrUserInfo['uid'], 'username' => $arrUserInfo['username'], 'email' => $arrUserInfo['email'], 'auth_time' => time(), 'auth_status' => '1');
db_factory::inserttable(TABLEPRE . "witkey_auth_email", $arrAuthDatas);
$arrRecordDatas = array('record_id' => null, 'auth_code' => 'email', 'uid' => $arrUserInfo['uid'], 'username' => $arrUserInfo['username'], 'auth_status' => '1');
db_factory::inserttable(TABLEPRE . "witkey_auth_record", $arrRecordDatas);
$objMessage = new keke_msg_class();
if ($objMessage->validate('reg')) {
$objMessage->send_message($arrUserInfo['uid'], $arrUserInfo['username'], 'reg', '注册成功', array(), $arrUserInfo['email'], '', 2);
}
}
}
}
} else {
kekezu::show_msg($_lang['operate_notice'], 'index.php', 3, '待激活的账号不存在', 'warning');
}
示例6: set_task_comment
public static function set_task_comment($comment_arr, $is_reply = false)
{
strtolower(CHARSET) == 'gbk' and $comment_arr['content'] = kekezu::utftogbk($comment_arr['content']);
$comment_arr['content'] = kekezu::escape(kekezu::str_filter($comment_arr['content']));
$lid = db_factory::inserttable(TABLEPRE . "witkey_comment", $comment_arr, 1);
$is_reply or db_factory::execute(sprintf("update %switkey_task set leave_num = leave_num+1 where task_id = '%d'", TABLEPRE, $comment_arr['obj_id']));
return $lid;
}
示例7: eval
<?php
$url = "index.php?do={$do}&view={$view}&target_id={$target_id}";
if (isset($stb_add)) {
eval("\$arr=" . kekezu::k_stripslashes($position) . ";");
$position = serialize($arr);
$insertsqlarr = array('name' => $name, 'code' => $code, 'description' => $description, 'targets' => $targets, 'position' => $position, 'ad_size' => $ad_size, 'ad_num' => $ad_num, 'sample_pic' => $sample_pic);
if ($target_id) {
$result = db_factory::updatetable("keke_witkey_ad_target", $insertsqlarr, array("target_id" => $target_id));
} else {
$result = db_factory::inserttable('keke_witkey_ad_target', $insertsqlarr);
}
$result && kekezu::admin_show_msg($_lang['add_submit_success'], $url, 3, '', 'success');
}
if ($target_id) {
$target_arr = db_factory::get_one("select * from " . TABLEPRE . "witkey_ad_target where target_id='{$target_id}'");
$target_arr['position'] = var_export(unserialize($target_arr['position']), 1);
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);