Oracle limit with Zend Db

Sometimes we have problem when using Oracle database, because oracle don't have SELECT LIMIT statement. But from Zend Framework source below, SELECT LIMIT is simulated automatically when we are using Zend Db Select:

 

So we can use Zend Db Select to create query easily, like this:


$select = $db->select()
             ->from(array('p' => 'products'),
                    array('product_id', 'product_name'))
             ->limit(20, 10);


$result = $select->fetchAll();


Comments

Popular posts from this blog

Ports to allow for whatsapp call

Manually clean up zimbra zmcat/zmcpustat exploit

Keychron K2 in Linux