Hey Jaruz,
Ms sql does not support the LIMIT clause and ZF does not emulate this.
There is, however, a workaround for this. Just google for "mssql limit
clause" to find it. You might want to extend Zend_Db_Table to
incorporate that one.
Best regards,
Tobias
--
Sent from my iPhone
Am 03.03.2008 um 11:18 schrieb JARUZ <[EMAIL PROTECTED]>:
Hi,
I have a very simple EventLogs extends Zend_Db_Table_Abstract class.
It
works fine except when I want to LIMIT the results on MSSQL:
$eventLogs = new EventLogs();
$select = $eventLogs->select();
$select->order('eventlog_timestamp DESC');
$select->limit(20, 10);
when I echo $select it shows:
SELECT "logs_event".* FROM "logs_event" ORDER BY
"eventlog_timestamp" DESC
SELECT * FROM (SELECT TOP 10 * FROM () AS inner_tbl) AS outer_tbl
That of course results in an Incorrect Syntax error from the MSSQL
server.
If I remove $select->limit(20, 10); the query works just fine.
Antonio
--
View this message in context:
http://www.nabble.com/Zend-Db-Select-limit-broken-for-MSSQL--tp15799936s16154p15799936.html
Sent from the Zend Framework mailing list archive at Nabble.com.