本文整理汇总了PHP中DedeSql::getarray方法的典型用法代码示例。如果您正苦于以下问题:PHP DedeSql::getarray方法的具体用法?PHP DedeSql::getarray怎么用?PHP DedeSql::getarray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DedeSql
的用法示例。
在下文中一共展示了DedeSql::getarray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
if(!isset($sectorid)) $sectorid = 0;
if(!isset($sectorid2)) $sectorid2 = 0;
if(empty($page)) $page = 1;
$areaid = intval($areaid);
$areaid2 = intval($areaid2);
$sectorid = intval($sectorid);
$sectorid2 = intval($sectorid2);
$page = intval($page);
isset($comname) || $comname = '';
$comname = trim($comname);
$allsectors = $areas = array();
$dsql->setquery("select id, name from #@__sectors order by disorder desc,id asc");
$dsql->Execute();
while($row = $dsql->getarray())
{
$allsectors[$row['id']] = $row['name'];
}
//////////////////////地区数据处理s/////////////////////////////
$sql = "select * from #@__area order by disorder desc,id asc";
$dsql->SetQuery($sql);
$dsql->Execute();
$toparea = $subarea = array();
while($sector = $dsql->GetArray())
{
$areas[$sector['id']] = $sector['name'];
if($sector['reid'] == 0)
示例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);
}
}