1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/docs/Advanced components - View - Managing views.php

17 lines
361 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
<code type="php">
$conn = Doctrine_Manager::getInstance()
->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();
</code>