Hello, I'm new to Symfony and am trying to understand some things
better.  At 
http://www.symfony-project.org/gentle-introduction/1_4/en/08-Inside-the-Model-Layer-Doctrine
there's a section on using Raw SQL queries.  It gives the following
example in listing 8-15:

$connection = Doctrine_Manager::connection();
$query = 'SELECT MAX(created_at) AS max FROM blog_article';
$statement = $connection->execute($query);
$statement->execute();
$resultset = $statement->fetch(PDO::FETCH_OBJ);
$max = $resultset->max;

My question is why do we perform ->execute() on $connection-
>execute($query), and then again perform ->execute right after it with
$statement->execute() ?  Could someone please explain to me what's
happening on these two lines? I understand everything else.

Thanks,
Jared

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to