本文整理汇总了PHP中DedeSql::executenonequery方法的典型用法代码示例。如果您正苦于以下问题:PHP DedeSql::executenonequery方法的具体用法?PHP DedeSql::executenonequery怎么用?PHP DedeSql::executenonequery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DedeSql
的用法示例。
在下文中一共展示了DedeSql::executenonequery方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ceil
if(strlen($des)<3) $des = "-";
$dsql->ExecuteNoneQuery("Update $maintable set description='{$des}' where ID='{$row['ID']}';");
$dsql->ExecuteNoneQuery("Update #@__full_search set addinfos='{$des}' where aid='{$row['ID']}';");
}
//返回进度信息
$startdd = $startdd + $pagesize;
if($totalnum > $startdd){
$tjlen = ceil( ($startdd/$totalnum) * 100 );
$dvlen = $tjlen * 2;
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>";
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务...";
$nurl = "description_fetch_action.php?action=fetch&totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&channel={$channel}&rpfield={$rpfield}&dsize={$dsize}&msize={$msize}&sid={$sid}&eid=$eid&addtable=".urlencode($addtable);
$dsql->Close();
ShowMsg($tjsta,$nurl,0,500);
exit();
}else{
$tjlen=100;
$dsql->executenonequery("OPTIMIZE TABLE `#@__full_search`");
$dsql->executenonequery("OPTIMIZE TABLE `$maintable`");
$dsql->Close();
echo "完成所有任务!";
exit();
}
}else{
$dsql->Close();
echo "完成所有任务!";
exit();
}
ClearAllLink();
}
?>
示例2: SpLongBody
if(!preg_match("/#p#/iU",$body)){
$body = SpLongBody($body,$cfg_arcautosp_size*1024,"#p#分页标题#e#");
$body = addslashes($body);
$dsql->ExecuteNoneQuery("Update $addtable set $rpfield='$body' where aid='$aid' ; ");
}
}
}//end if limit
//返回进度提示
if($totalnum>0) $tjlen = ceil( ($tjnum/$totalnum) * 100 );
else $tjlen=100;
$dvlen = $tjlen * 2;
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>";
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务...";
if($tjnum < $totalnum)
{
$addtable = urlencode($addtable);
$nurl = "pagination_fetch_action.php?action=fetch&totalnum=$totalnum&startdd=".($startdd+$pagesize)."&pagesize=$pagesize&addtable={$addtable}&rpfield={$rpfield}&channel={$channel}&sid={$sid}&eid={$eid}";
$dsql->Close();
ShowMsg($tjsta,$nurl,0,500);
}else{
$dsql->executenonequery("OPTIMIZE TABLE `$addtable`");
$dsql->Close();
ShowMsg('完成所有任务','javascript:;');
}
}
ClearAllLink();
?>
示例3: DedeSql
$dsql = new DedeSql(false);
if(empty($pagesize)) $pagesize = 20;
if(empty($pageno)) $pageno = 1;
if(empty($dopost)) $dopost = '';
if(empty($orderby)) $orderby = 'aid';
if(empty($showtag)) $showtag = 0;
if(empty($showkw)) $showkw = 0;
if(!isset($action)) $action = '';
if($action == 'delete'){
if(is_array($kids)){
$kids = implode(',', $kids);
$query = "delete from #@__search_keywords where aid in ($kids)";
if($dsql->executenonequery($query)){
showmsg('批量删除关键词成功', 'search_keywords_main.php');
exit;
}else{
showmsg('批量删除关键词失败', 'search_keywords_main.php');
exit;
}
}
}
//初处化处理
$addget = '';
$addsql = '';
if(empty($keyword)){
$keyword = '';
}
示例4: DedeSql
}
if($exptable==''||$rpfield==''){
ShowMsg("请指定数据表和字段!","javascript:;");
exit();
}
if($rpstring==''){
ShowMsg("请指定被替换内容!","javascript:;");
exit();
}
$dsql = new DedeSql(false);
if($rptype=='replace'){
if(!empty($condition)) $condition = " where $condition ";
else $condition = "";
$rs = $dsql->ExecuteNoneQuery("Update $exptable set $rpfield=Replace($rpfield,'$rpstring','$tostring') $condition ");
$dsql->executenonequery("OPTIMIZE TABLE `$exptable`");
$dsql->Close();
if($rs) ShowMsg("成功完成数据替换!","javascript:;");
else ShowMsg("数据替换失败!","javascript:;");
}else
{
if(!empty($condition)) $condition = " And $condition ";
else $condition = "";
$rpstring = stripslashes($rpstring);
$rpstring2 = str_replace("\\","\\\\",$rpstring);
$rpstring2 = str_replace("'","\\'",$rpstring2);
$dsql->SetQuery("Select $keyfield,$rpfield From $exptable where $rpfield REGEXP '$rpstring2' $condition ");
$dsql->Execute();
$tt = $dsql->GetTotalRow();
if($tt==0){
$dsql->Close();
示例5: array
$dsql->setquery($query);
$dsql->execute();
$channels = array();
while($row = $dsql->getarray())
{
$channels[$row['ID']] = $row['maintable'];
}
$query = "select aid, litpic,channelid from #@__full_search where litpic<>''";
$dsql->setquery($query);
$dsql->execute('litpic');
while($row = $dsql->getarray('litpic'))
{
if(!preg_match("/^http:\/\//i",$row['litpic'])){
if(!file_exists($row['litpic'])){
$query = "update #@__full_search set litpic='' where aid=".$row['aid']." limit 1";
$dsql->executenonequery($query);
$maintable = $channels[$row['channelid']];
$query = "update ".$maintable." set litpic='' where aid=".$row['aid']." limit 1";
$dsql->executenonequery($query);
}
}
}
$dsql->Close();
ShowMsg("成功修正缩略图错误!","javascript:;");
exit();
}elseif($action == 'delerrdata')
{
$query = "select ID from #@__channeltype";
$dsql->setquery($query);
$dsql->execute();
$channelids = 0;