Zend Framework 2 and SELECT count(*) query
I'm trying to do a query like this using Zend Framework 2: SELECT count(*) as num FROM mytable Here's the code I'm using to build my select statement (bear in mind I've imported the necessary classes): $select = new Select(); $select->from('mytable') ->columns(array('num'=>'count(*)'), false); This code doesn't work because the resulting query is as follows: SELECT [count(*)] AS [num] FROM [mytable] ...which throws the following error: Invalid column name 'count(*)' This is caused by the square brackets around count(*). How can I get this to work properly, basically to have count(*) instead of