Contact
The best way to reach me is via email and that would be sohaib.muneer@gmail.com
and if you really want to talk or something then be my guest - here you go, have a couple of direct dials:
Voice(Pakistan) : +92-321-440-6240
One Response to “Contact”
Leave a Reply
Jean Luis on November 11th, 2011
Paginate a Find Result
Hello, im looking for a solution to this little problem of mine, i need to paginate tha data resulting from a custom find, bellow you can see the code that im using, at this point i get all the data that i need, but i”d like to paginate it because sometimes it returns a large amount of data.
Anyone have a suggestion??
THX in advance
PS: if you anything else code wise or me being more specific let me know
//THIS FORCES TO DO THIS “SELECT * FROM table1 LEFT JOIN table2 WHERE…..”
$this->Equipo->unbindModel(array(’hasMany’=>array(’Storages’)));
$this->Equipo->bindModel(array(’hasOne’=>array(’Storages’=>array(
‘foreignKey’=>false,
‘conditions’=>array(’Equipo.id_almacen = storages.id’)
)
)
)
);
//IN THIS PART $ DATA GETS THE VALUE OF “SELECT * FROM table1 LEFT JOIN table2 WHERE…..”
$data=$this->Equipo->find(’all’,array(’conditions’=>array(
‘part_number LIKE’=>”%”.$this->data['Equipo']['part_number'].”%”,
‘id_almacen LIKE’=>”%”.$this->data['Equipo']['id_almacen'].”%”,
‘equipo_central LIKE’=>”%”.$this->data['Equipo']['equipo_central'].”%”,
‘descripcion LIKE’=>”%”.$this->data['Equipo']['descripcion'].”%”
),
)
);