Is there a way to execute a SQL String as a query in Zend Framework 2?
I have a string like that:
$sql = \"SELECT * FROM testTable WHERE myColumn = 5
If you are using tableGateway, you can run your raw SQL query using this statement,
$this->tableGateway->getAdapter()->driver->getConnection()->execute($sql);
where $sql pertains to your raw query. This can be useful for queries that do not have native ZF2 counterpart like TRUNCATE / INSERT SELECT statements.