コード例 #1
0
 */

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>