| 
<?php
@require("PDOConnectionFactory.class.php");
 
 $db = new PDOConnectionFactory();
 $pdo = $db->getConnection();
 
 /**
 * example of list for names of table 'agenda'
 */
 try{
 $stmt = $pdo->prepare("SELECT * FROM agenda");
 $stmt->execute();
 
 while ($rs = $stmt->fetch(PDO::FETCH_OBJ)) {
 // 'name' is real name of field
 echo "output: ".$rs->name."<br />";
 }
 $pdo = null;
 }catch(PDOException $e){ echo $e->getMessage(); }
 |