Saturday, 15 June 2013

php - show listTables on symfony2 in my view -



php - show listTables on symfony2 in my view -

i'm using symfony 2 , doctrine 2, want show list tables of db in template searchelement.html.twig

i seek execute code

$tables = $sm->listtables();

in pagesearchcontroller error:

fatal error: phone call fellow member function listtables() on non-object in c:\program files (x86)\easyphp\data\localweb\symfony2test\src\sftn\testbundle\controller\pagesearchcontroller.php on line 33

i next tutorial http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/schema-manager.html#listtables

try finish version symfony2:

$connection = $this->get('database_connection'); $sm = $connection->getschemamanager();

php symfony2 doctrine2

No comments:

Post a Comment