I have always had favorable results making a searches_controller model
and view.  This way, if you want to search for different things, say,
search the website, search the documentation, search the code, then it
scales very well because all your searches are pointed at one
controller.  This makes it very scalable for me.  I can have advanced
search page, search boxes etc. Plus you get to use the highlighter and
if you are using mysql, you can make it return the search ranking so
you can replace it with stars (or sprinkles if you prefer).

On Nov 30, 9:47 am, José Pablo Orozco Marín <[EMAIL PROTECTED]>
wrote:
> Cool! im a newbee too :)
>
> sendami escribió:
>
>
>
> > I'm using cake 1.1.  Are there big differences between 1.1 and 1.2?
> > I'm totally a newbee. I just started cake two weeks ago.
> > I recognized that many people are using cake 1.2.
> > I'll try the version and your code.
> > Anyway, thank you very much for your reply.
>
> > On Nov 29, 7:50 pm, José Pablo Orozco Marín <[EMAIL PROTECTED]>
> > wrote:
>
> >> Which version of cakephp are you using?
> >> Normally for me works the following 3 lines of code using cakephp 1.2
>
> >>      uses('sanitize');
> >>      $sanitize = new Sanitize();
> >>      $this->cleanData = $sanitize->clean( $this->data );
>
> >> sendami escribió:
>
> >>> I got an error message like below.
>
> >>> Fatal error: Call to undefined method Sanitize::clean() in C:\AppServ
> >>> \www\app\controllers\cms_categories_controller.php on line 18
>
> >>> ant the line 18 is below.
>
> >>>  $this->cleanData = $sanitize->clean( $this->data );
>
> >>> What I have to do?
>
> >>> On Nov 27, 5:26 pm, Josoroma <[EMAIL PROTECTED]> wrote:
>
> >>>> I clean a little bit the code :)
> >>>> This works for me, but my question is:
> >>>> Where do i have toi clean the data for thissearch, here in the
> >>>> controller or inside the model?
>
> >>>>         function index() {
>
> >>>>                 $this->Benchlink->recursive = 0;
>
> >>>>                 uses('sanitize');
> >>>>                 $sanitize = new Sanitize();
>
> >>>>                 $this->set('findUrlNotCleaned', 
> >>>> trim($this->data['formFind']
> >>>> ['find']) );
>
> >>>>                 $this->cleanData = $sanitize->clean( $this->data );
>
> >>>>                 $findUrl = low( 
> >>>> trim($this->cleanData['formFind']['find']) );
>
> >>>>                 if ( $findUrl != '' ) {
>
> >>>>                         $this->set('benchlinks', 
> >>>> $this->paginate('Benchlink',
> >>>> array("LOWER(`Benchlink`.`url`) LIKE '%" . $findUrl . "%'")));
>
> >>>>                 } else {
>
> >>>>                         $this->set('benchlinks', $this->paginate());
>
> >>>>                 }
>
> >>>>         }
>
> >> --
>
> >> -----------------------------------------
>
> >> José Pablo Orozco Marín
> >> [EMAIL PROTECTED]
>
> >> Tel. +506 820-7280
>
> >> Por favor, visite mi pasión:http://www.SukiaLogic.com/-Hide quoted text -
>
> >> - Show quoted text -
>
> --
>
> -----------------------------------------
>
> José Pablo Orozco Marín
> [EMAIL PROTECTED]
>
> Tel. +506 820-7280
>
> Por favor, visite mi pasión:http://www.SukiaLogic.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to