It is hard to give a specific example without your db schema and what type of search query you want to perform.

But from the information you gave it seems that a "fulltext" search would be the easiest to implement.

Here is an article on how to setup fulltext on your database with how to query it.
http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html

To perform the query you will most likely need to use a custom sql statement within your model.
http://manual.cakephp.org/chapter/models
If you scroll about 1/3 of the way down you will see the section on custom sql calls.

For your needs this solution should be quick and painless.

Maybe someone has a better solution?



On 8/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi.

I would like to create a simple search form for my page.. it should
search 1 table and show the result? Could not find any information
about this (manual, wiki, forum etc.)  This is what I have tried so
far:

controller:
function search(){
        $conditions = $this->postConditions($this->data);
        $this->Recipe->findAll($conditions);
}

index:
<?php echo $html->input('Recipe/name'); ?>
<div class="submit">
<?php echo $html->submit('search');?>
</div>

Something is missing because nothing happens when I click search!

Best regards.
Asbjørn Morell.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to