I am using PDO Firebird with Zend\Db.
This is fine until i want to limit the number of records returned. I am using this code;
$select = $this->getSelect()
->limit($limit);
Which produces this SQL;
SELECT "MODELS".* FROM "MODELS" limit '10'
However firebird needs SQL like this;
SELECT first 10 "MODELS".* FROM "MODELS"
I can change the word 'limit' to 'first' by using this statement;
$select->setSpecification('limit', 'first %1$s');
But I can't figure out how i get it to put the limit (first) clause at the beginning of the SQL and not at the end.
I can't find the code in Zend\Db\Sql\Select that puts the SQL parts together.