Hello,

I still have some problems with the parameters for "find"

I have two different sets of parameters but I have the impression the
result doesn't react on them, but simply gives me a list with nearly all
of my datasets:

Version 1:
$params = array(
'conditions' => array('Textmaster.katalogobjekt_id' => 1,
'Textmaster.sprache_id' => 1, 
  'Textmaster.textinhalt LIKE' =>
'%'.trim($this->data['Textmaster']['textinhalt']).'%', 
  'Textmaster.suchkriterium LIKE' =>
'%'.trim($this->data['Textmaster']['suchkriterium']).'%'), 
'fields' =>
array('Textmaster.id','Textmaster.suchkriterium','Textmaster.textinhalt'
),
'order' => 'Textmaster.suchkriterium ASC',
'recursive' => -1 
);      

Version 2:
$params = array(
'conditions' => array('Textmaster.katalogobjekt_id' => 1,
'Textmaster.sprache_id' => 1), 
'fields' =>
array('Textmaster.id','Textmaster.suchkriterium','Textmaster.textinhalt'
),
'order' => 'suchkriterium ASC',
'recursive' => -1 
);      

$textmasters = $this->Textmaster->find('all',$params);
$this->set('textmasters', $this->paginate());   

Question 1: What does 'fields' do? I thought it would load only those
fields, but my dataset seems to load completely because in the view
every column is populated

Question 2: the 'order' criteria is being ignored. Do I have the wrong
syntax? The result is still sorted by 'id'.

Question 3: the "like" condition is also ignored, although it arraives
in the parameter array:
E.g.:
Array
(
    [conditions] => Array
        (
            [Textmaster.katalogobjekt_id] => 1
            [Textmaster.sprache_id] => 1
            [Textmaster.textinhalt LIKE] => %Modern%
            [Textmaster.suchkriterium LIKE] => %ACE109%
        )

    [fields] => Array
        (
            [0] => Textmaster.id
            [1] => Textmaster.suchkriterium
            [2] => Textmaster.textinhalt
        )

    [order] => Textmaster.suchkriterium ASC
    [recursive] => -1
)

Any hints on what is going wrong are appreciated.



Anja C. Liebermann

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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