PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Rodrigo Agostinho   Design Pattern PDO Operations   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: pdo design pattern
Class: Design Pattern PDO Operations
Access SQL databases with the PHP PDO extension
Author: By
Last change:
Date: 12 years ago
Size: 889 bytes
 

Contents

Class file image Download
<?

/**
 * Description of INDEX
 *
 * @author Rodrigo Agostinho
 */

require_once 'ClientsUI.php';
require_once
'ClientsDAO.php';
require_once
'ClientsDTO.php';

$clientUI = new ClientsUI();

/* INSERT NEW REGISTER
 * $clientsDTO = new ClientsDTO();
 * $clientsDAO = new ClientsDAO();

 * $clientsDTO->setName("Rodrigo");
 * $clientsDTO->setStreet("1st Street");
 * $clientsDTO->setFone("1234567890");

 * $clientsDAO->insert($clientsDTO);
 */

/* DELETE REGISTER
 *
 * $clienteDTO->ssetClient_id(1);
 * $clientsDAO->insert($clientsDTO);
 *
 */

/*
 *
 * $clienteDTO->ssetClient_id(1);
 * $clientsDTO->setName("Rodrigo");
 * $clientsDTO->setStreet("3rd Street");
 * $clientsDTO->setFone("0987654321");

 * $clientsDAO->update($clientsDTO);
*/

echo "<h3>Client list</h3>";
echo
"<hr />";
//LIST ALL REGISTER
$clientUI->listAll();
?>