1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Connection - Getting a table object.php

14 lines
354 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
In order to get table object for specified record just call Doctrine_Record::getTable() or Doctrine_Connection::getTable().
<code type="php">
$manager = Doctrine_Manager::getInstance();
// open new connection
$conn = $manager->openConnection(new PDO('dsn','username','password'));
// getting a table object
$table = $conn->getTable('User');
</code>