本文整理匯總了PHP中UserDAO::getUserList方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserDAO::getUserList方法的具體用法?PHP UserDAO::getUserList怎麽用?PHP UserDAO::getUserList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserDAO
的用法示例。
在下文中一共展示了UserDAO::getUserList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UserDAO
*/
define("DBTYPE", "mysql");
define("DBUSER", "daophp5");
define("DBPASS", "daophp5");
define("DBHOST", "localhost");
define("DBNAME", "test");
// create the DSN
$dsn = DBTYPE."://".DBUSER.":".DBPASS."@".DBHOST."/".DBNAME;
// create a new UserDAO (user data access object)
$userDAO = new UserDAO($dsn);
// use the user data access object to retrieve a list (SPL ArrayObject) of users
$userList = $userDAO->getUserList();
$userDAO->close();
?>
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree flex="1" enableColumnDrag="true">
<treecols>
<treecol id="idCol" label="Id" fixed="true" primary="true"/>
<splitter class="tree-splitter"/>
<treecol id="userCol" label="Name" flex="2" />
<splitter class="tree-splitter"/>
<treecol id="emailCol" label="Email" flex="2" />
</treecols>
<treechildren>