Location: PHPKode > scripts > MyEzSQL > myezsql-2009-04-05/example/index.php
<?PHP
//Database related stuff:
$host = "";
$port = ""; //Leave blank if you don't know this
$user = "";
$pass = "";
$database = "";

$classPath = "../class/MyEzSQL.class.php";

include($classPath);
$MyEzSQL = new MyEzSQL();
$MyEzSQL->setLogin($host, $port, $user, $pass, $database);
$MyEzSQL->connect();
$MyEzSQL->select("tbl");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MyEzSQL Example</title>
</head>

<body>
<?PHP
echo "Number of rows: <br />\n".$MyEzSQL->numrows()."<br />\n<br />\n";
while($row = $MyEzSQL->getArray()){
	echo "Name: ".$row['name']."<br />\n Data: ".$row['data']."<br />\n<br />\n";
}
?>
</body>
</html>
<?PHP
//Close the database connection:
$MyEzSQL->close();
?>
Return current item: MyEzSQL