Advanced components - View - Managing views.php 358 Bytes
Newer Older
1 2
<?php
$conn = Doctrine_Manager::getInstance()
runa's avatar
runa committed
3
        ->openConnection(new PDO("dsn","username","password"));
4 5 6 7 8 9 10 11 12 13 14 15

$query = new Doctrine_Query($conn);
$query->from('User.Phonenumber')->limit(20);

$view  = new Doctrine_View($query, 'MyView');

// creating a database view
$view->create();

// dropping the view from the database
$view->drop();
?>