1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/manual/docs/Advanced components - View - Using views.php

16 lines
365 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);
// hook the query into appropriate view
$view = new Doctrine_View($query, 'MyView');
// now fetch the data from the view
$coll = $view->execute();
</code>