本文整理汇总了PHP中DedeSql::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP DedeSql::execute方法的具体用法?PHP DedeSql::execute怎么用?PHP DedeSql::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DedeSql
的用法示例。
在下文中一共展示了DedeSql::execute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
}
$dsql->SetQuery($q1);
$dsql->Execute();
$rownum = $dsql->GetTotalRow();
if($rownum<2) continue;
$i = 1;
while($row = $dsql->GetObject()){
$i++;
$naid = $row->ID;
$ntitle = $row->title;
if($i > $rownum){ continue; }
$totalarc++;
DelArc($naid);
}
}
$dsql->executenonequery("OPTIMIZE TABLE `$maintable`");
$dsql->Close();
ShowMsg("一共删除了[{$totalarc}]篇重复的文档!","javascript:;");
exit();
}
$channelinfos = array();
$dsql->setquery("select ID,typename,maintable,addtable from #@__channeltype");
$dsql->execute();
while($row = $dsql->getarray())
{
$channelinfos[] = $row;
}
require_once(dirname(__FILE__)."/templets/article_test_same.htm");
ClearAllLink();
?>
示例2: DedeSql
<?php
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/../include/inc_typelink.php");
require_once(dirname(__FILE__)."/inc/inc_batchup.php");
CheckPurview('sys_ArcBatch');
@set_time_limit(0);
$dsql = new DedeSql(false);
if($action=='modddpic')
{
$query = "select ID,maintable from #@__channeltype";
$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);
}
}