本文整理匯總了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;