當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataList::SetSource方法代碼示例

本文整理匯總了PHP中DataList::SetSource方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataList::SetSource方法的具體用法?PHP DataList::SetSource怎麽用?PHP DataList::SetSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataList的用法示例。


在下文中一共展示了DataList::SetSource方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trim

	}
	$wheresql .= " and typeid2=$sectorid2";
}

if($comname != ''){
	$wheresql .= " and comname LIKE '%".$comname."%'";
}

$wheresql = trim($wheresql);
if(eregi("^and", $wheresql)) {
	$wheresql = substr($wheresql,3);
}
if($wheresql != ''){
	$wheresql = 'where '.trim($wheresql);
}

$companys = array();
$query = "select id, comname, regyear, areaid, areaid2, service, typeid1, typeid2, comaddr, website, postid
from #@__member_cominfo $wheresql";
$dlist = new DataList();
$dlist->pageSize = 10;
$dlist->SetParameter("sectorid",$sectorid);
$dlist->SetParameter("sectorid2",$sectorid2);
$dlist->SetParameter("areaid",$areaid);
$dlist->SetParameter("comname",$comname);
$dlist->SetParameter("areaid2",$areaid2);
$dlist->SetSource($query);

include(dirname(__FILE__)."/template/default/search_list.htm");

?>
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:31,代碼來源:search.php

示例2: DataList

<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('co_NewRule');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");

$sql  = "
Select
aid,rulename,etype,dtime
From #@__co_exrule
order by aid desc
";

$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/co_export_rule.htm");
$dlist->display();
$dlist->Close();

ClearAllLink();
?>
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:23,代碼來源:co_export_rule.php

示例3: IsCheck

<?php 
require_once(dirname(__FILE__)."/config.php");
require_once(dirname(__FILE__)."/../include/pub_datalist_dm.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
$bgcolor = "";
if(!isset($keyword)) $keyword="";
if(!isset($typeid)) $typeid="0";

function IsCheck($st)
{
	if($st==1) return "[已審核]";
	else return "<font color='red'>[未審核]</font>";
}


$querystring = "select * from #@__feedback where CONCAT(#@__feedback.msg,#@__feedback.arctitle) like '%$keyword%' order by dtime desc";

$dlist = new DataList();
$dlist->pageSize = 10;
$dlist->Init();
$dlist->SetParameter("typeid",$typeid);
$dlist->SetParameter("keyword",$keyword);
$dlist->SetSource($querystring);
include(dirname(__FILE__)."/templets/feedback_main.htm");
$dlist->Close();

ClearAllLink();
?>
開發者ID:BGCX262,項目名稱:zyyhong-svn-to-git,代碼行數:28,代碼來源:feedback_main.php


注:本文中的DataList::SetSource方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。