After we have seen how to execute simply queries, it is now time to tell you about the
TableGateway, and it's incredible functionality. This recipe is all about querying the database through this and showing off its capabilities.
To make full of the following recipe, a Zend Framework 2 skeleton application should be used, with a MySQL server available to connect to. Don't forget that connecting to a MySQL server requires the
mysqli extension enabled in PHP.
What we are going to do first is insert a record in our sample table. After that we will check that it was inserted successfully. Next, we will update the record with some new data, and if that worked we will delete it again ...