1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/manual/codes/Advanced components - View - Managing views.php

16 lines
358 B
PHP
Raw Normal View History

<?php
$conn = Doctrine_Manager::getInstance()
2007-02-06 17:41:45 +03:00
->openConnection(new PDO("dsn","username","password"));
$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();
?>