Suhayb
Suhayb

Reputation: 3271

How to fetch many rows order by a specific value

by using zend 1.12 how to order the data fetched by, a specific entry first. (order by) how to make the last option for ex 'Bioversity International' be the first one beside the where clause a written below .

$_partnerMapper = new Model_Mapper_Partner();
$_partnerCollection = $_partnerMapper->fetchMany(array('partner_type_id'=>9));
$this->view->partnerCollection = $_partnerCollection;

Upvotes: 0

Views: 79

Answers (1)

Moayad AL-Najdawi
Moayad AL-Najdawi

Reputation: 102

this is not zend 1.12 its something outside zend but its like the following

fetchMany($criteria=null,$order=null,$count=null,$offset=-1)

so what you need to do is $_partnerMapper->fetchMany(array('partner_type_id'=>9),'partner_type_id ASC');

Upvotes: 1

Related Questions