<?php /* * Created on 30/01/2006 */ include_once("connection/Connection.class.php"); $conn = new Connection(); try { $conn->connect(); } catch (Exception $e) { print_r($e); } try { $conn->beginTransaction(); } catch (Exception $e) { print_r($e); } $query1 = "insert into usuarios (nome, email) values ('Adler Brediks Medrado','adler@neshertech.net')"; try { $boInclusao = $conn->executeDML($query1); } catch (Exception $e) { print_r($e); }
$query2 = "select * from usuarios"; try { $rsUsuarios = $conn->executeQuery($query2); } catch (Exception $e) { print_r($e); }
echo "<pre>"; print_r($rsUsuarios); echo "</pre>";
$query3 = "delete from usuarios where nome = 'Adler Brediks Medrado'"; try { $boExclusao = $conn->executeDML($query3); } catch (Exception $e) { print_r($e); } try { $conn->rollback(); } catch(Exception $e) { print_r($e); } ?>
|