Home » Tag Archives: php zend framework

Tag Archives: php zend framework

Get baseurl in zendframework

The developers are can use this piece of code anywhere in zendframework  project for get baseurl of currently running project. <?php echo rtrim(Zend_Controller_Front::getInstance()->getBaseUrl(),’/’); ?>

Read More »

Zend framework select Query with order Random

Use order(‘RAND()’)  in zendframework select query for fetching records in random. $usersTable = Engine_Api::_()->getItemTable(‘user’); $select = $usersTable->select() ->where(‘enabled = ?’, 1) ->where(‘approved = ?’, 1)   ->order(‘RAND()’) ->limit(5);

Read More »