Friday, July 9, 2010

Cake1.3, Paginate with fulltext search is having problems when going to page 2 and so on?

My code here at the bin (controller/action):
http://bin.cakephp.org/saved/60040

View of that controller:
http://bin.cakephp.org/view/87988950

Is capturing data using.
$keywords = trim($this->data['Publication']['keywords']);

And passing it to paginate with fulltext search.
$scope = array("MATCH(Publication.ITEMCODE, Publication.ITEMCODE_OLD, Publication.ITEMSTOCK, Publication.ITEMSUBCAT, Publication.ITEMNAME, Publication.ITEMLANGUAGE, Publication.ITEMISSUE, Publication.ITEMINFORMATION, Publication.ITEMDISTRIBUTION, Publication.ITEMPRODURL, Publication.ITEMKEYWORDS, Publication.ITEMREPORTTYPE)
      AGAINST ('".$keywords."')");
      $results = $this->paginate('Publication',$scope);

And displaying the results going to view using $results
      $this->set('results', $results);

The code is working fine, dynamic or static _POST. The problem is, whenever I go to the succeeding page (ex: page 2, 3 and 4 and so on). The query from $keywords is disappearing.

I tested static keywords.
$keywords = 'Jazz';

And this works, even the pagination on the succeeding page.

Any idea, why if the data received (dynamic) when going to the next pages is not working? Did I missed something out?
--
Louie Miranda
 - Email: lmiranda@gmail.com
 - Web: http://www.louiemiranda.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: