Evan Coury Articles

Building and Executing SQL Queries In Zend

April 8, 2014

<p>Whilst there are many ways for building and executing <!-- raw HTML omitted -->SQL<!-- raw HTML omitted --> queries in Zend Framework 2, the two that I usually use, and which are also used in the ZF2 manual, are <strong>closures</strong> and the selectWith function. <!-- raw HTML omitted -->I previously <!-- raw HTML omitted --><!-- raw HTML omitted -->wrote a three part series<!-- raw HTML omitted --><!-- raw HTML omitted -->, showing how to get started using the <!-- raw HTML omitted --><!-- raw HTML omitted -->\Zend\Db\Sql<!-- raw HTML omitted --><!-- raw HTML omitted --> classes with Zend Framework 2, but I didn’t cover how to actually <!-- raw HTML omitted --><!-- raw HTML omitted -->run them<!-- raw HTML omitted --><!-- raw HTML omitted -->. So in today’s tutorial, let’s do that.</p>