php - How to convert a mysql query in CakePHP pagination condition -
i have below mysql
query. want convert mysql query in cakephp pagination condition. can result.
mysql query:
select *, 3963 * acos(cos(radians(90-lat ))*cos(radians(90-'".$result['lat']."'))". "+sin(radians(90-lat ))* sin(radians(90-'".$result['lat']."'))". "*cos(radians(lng- '".$result['lng']."'))) distance member"." having (distance < 5) order distance asc
i using php code
$condition = array('member.is_deleted !=' => 1, 'member.status !=' => 0, 'or' => array()); $this->paginate = array( 'conditions' => $condition, 'fields' => array() );
php mysql cakephp pagination cakephp-2.0
No comments:
Post a Comment