help plz

2009-04-03 Thread monirr444


hello i have some problems here 

i have fields Active i'm try do a find in index find all conditions active => 1 
i want only active to 1 to show not to 0   
here is the code 


function index($id = null) { 
$this->Item->recursive = 0; 
$this->set('items', $this->paginate()); 
$item = $this->Item->find('all', array( 
'conditions' => array( 
'Item.active' => 1, 
) 
) 
); 
$this->set('item', $item); 

} 
thank you for the help guys 
-- 
View this message in context: 
http://n2.nabble.com/help-plz-tp2581436p2581436.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



help plz

2009-04-03 Thread monirr444


hello i have some problems here 

i have fields Active i'm try do a find in index find all conditions active => 1
i want only active to 1 to show not to 0  
here is the code 


function index($id = null) {
$this->Item->recursive = 0;
$this->set('items', $this->paginate());
$item = $this->Item->find('all', array(
'conditions' => array(
'Item.active' => 1,
)
)
);
$this->set('item', $item);

}
thank you for the help guys 
-- 
View this message in context: 
http://n2.nabble.com/help-plz-tp2581224p2581224.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake bake and views.

2009-03-17 Thread monirr444


oh my bad i forgot to say ur useing the scaffold not the actual views run the
console bake the controller 
when u say cake bake 
press c
choese ur controller form the list 
when it say "would you like to build your controller interactively ?"
say "no"
and then it will say "would you like to include some basics methods (index()
add() view()"
say yes 
admin routhing is option 
the it will bake the controller whith functions 
the u have to run bake agian to bake the views 

 

locust wrote:
> 
> 
> I'm new to cakephp and just trying to get a basic site going using
> scaffolding and bake from a completely fresh install of cakephp.  It
> works ok--as in the scaffolds do what they should do--but when I go to
> make a change in any of the views, that change never appears on the
> pages.  I can even remove/rename the views folder and it makes
> absolutely no difference, as if cake isn't using that folder for
> anything.  The page loads just like always.  I guess it's caching
> somewhere, though I cannot figure out where, or why caching would be
> on by default (the manual claims it isn't).
> 
> Any help?
> 
> > 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Cake-bake-and-views.-tp2492759p2492847.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



help with default.ctp

2009-03-16 Thread monirr444


this is my code for default.ctp at the bottom there is banner that i want to
show in my new controller that i made recently but it wont show up it show
in every other controller that i have but not this i'm confuesd can some one
help me with this thank you 
is there something i need to put in my controller or i dont know it should
work though cuz $content_for _layout dose it for every  view if  i'm not
worng. 

 
element('flash'); ?> 

 

 
 
 
element('banners/site_banners');?> 
 
link(); 
?> 
 
 
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl."; : "http://www.";); 
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 
 
 
var pageTracker = _gat._getTracker("UA-5701076-1"); 
pageTracker._trackPageview(); 
 
 
-- 
View this message in context: 
http://n2.nabble.com/help-with-default.ctp-tp2486489p2486489.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



help with default.ctp

2009-03-16 Thread monirr444



this is my code for default.ctp at the bottom there is banner that i want to
show in my new controller that i made recently but it wont show up it show
in every other controller that i have but not this i'm confuesd can some one
help me with this thank you 
is there something i need to put in my controller or i dont know it should
work though cuz $content_for _layout dose it for every  view if  i'm not
worng.


element('flash'); ?>






element('banners/site_banners');?>

link();
?>


var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl."; : "http://www.";);
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));


var pageTracker = _gat._getTracker("UA-5701076-1");
pageTracker._trackPageview();


-- 
View this message in context: 
http://n2.nabble.com/help-with-default.ctp-tp2486311p2486311.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: help with complex condations brian-9

2009-02-11 Thread monirr444


Thank you Man your The besst

monirr444 wrote:
> 
> here is the code i want to search but not inactive ones i have this code
> so far it wont work
> thank you helping the other  time 
> if u can help with that would be great 
> 
>   function search($item = null) {
>$item = $this->params['url']['q'];
> $recipes = $this->Recipe->find('all', array('conditions' => array(
> 'OR' =>array(
>  'Recipe.name LIKE' => '%' . $item . '%',
>  'Recipe.seasonal LIKE' => '%' . $item . '%',
>  'Recipe.ingredients  LIKE' => '%' . $item . '%')),
>  'AND' => array(
>  array(
>  'OR'=>array(
>  'Recipe.active' =>'1'),
>  'NOT'=>array(
>  'Recipe.active'=> array('0')),
> 'order' => 'Recipe.name',
> 'recursive' => 1,
>  
>
> ;
> 

-- 
View this message in context: 
http://n2.nabble.com/help-with-complex-condations-brian-9-tp2310476p2311928.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: can sombody help me here plz

2009-02-11 Thread monirr444


ok here it is 
this is in my public website its search thing to search recipes 
i put these 3 condations it works fine but only things i dont want them to
see the inactive recipes 
there is field active when is active its "1" when its not its '0'
when i search it show all the inactive one i wanna exclude inactive ones
sorry for the english 

Miles J wrote:
> 
> 
> Can you tell as what exactly your trying to query, OR what the query
> should look like.
> > 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/can-sombody-help-me-here-plz-tp2311545p2311879.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



can sombody help me here plz

2009-02-11 Thread monirr444


here is the code i want to search but not inactive ones i have this code so
far it wont work 



function search($item = null) { 
 $item = $this->params['url']['q']; 
$recipes = $this->Recipe->find('all', array('conditions' => array( 
'OR' =>array( 
 'Recipe.name LIKE' => '%' . $item . '%', 
 'Recipe.seasonal LIKE' => '%' . $item . '%', 
 'Recipe.ingredients  LIKE' => '%' . $item . '%')), 
 'AND' => array( 
 array( 
 'OR'=>array( 
 'Recipe.active' =>'1'), 
 'NOT'=>array( 
 'Recipe.active'=> array('0')), 
'order' => 'Recipe.name', 
'recursive' => 1, 
  

; 
-- 
View this message in context: 
http://n2.nabble.com/can-sombody-help-me-here-plz-tp2311359p2311359.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



help with complex condations brian-9

2009-02-11 Thread monirr444


here is the code i want to search but not inactive ones i have this code so
far it wont work
thank you helping the other  time 
if u can help with that would be great 

function search($item = null) {
 $item = $this->params['url']['q'];
$recipes = $this->Recipe->find('all', array('conditions' => array(
'OR' =>array(
 'Recipe.name LIKE' => '%' . $item . '%',
 'Recipe.seasonal LIKE' => '%' . $item . '%',
 'Recipe.ingredients  LIKE' => '%' . $item . '%')),
 'AND' => array(
 array(
 'OR'=>array(
 'Recipe.active' =>'1'),
 'NOT'=>array(
 'Recipe.active'=> array('0')),
'order' => 'Recipe.name',
'recursive' => 1,
 
   
;
-- 
View this message in context: 
http://n2.nabble.com/help-with-complex-condations-brian-9-tp2310476p2310476.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



css problem

2009-02-10 Thread monirr444


How to put Two css in Defalut Layout whithout reflecting with each other 
i have this jquery plugin its media viewer i want the users to play the
youtube videos of my site in my own website in Iframe whenver i put the css
and javascrpt it reflect with each other any help will be appreciated

this my code in my views that i want to link with html 

   link('Watch the video',
$recipe['Recipe']['youtube']);
}
?>


with this html code 


http://www.youtube.com/v/wbzLpteC8ng&autoplay=1 YouTube 
-- 
View this message in context: 
http://n2.nabble.com/css-problem-tp2303123p2303123.html
Sent from the CakePHP mailing list archive at Nabble.com.

.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: iphone version of my site

2009-02-09 Thread monirr444


i have the layout and the java script for the iphone  i used the Joe Hewitt's
IUI layout and javascrpt it worked fine just i dont have much  experience
with cakephp i dont know how this deafult.ctp works whatever i put in there
it share it with other view if u can help with some

BrendonKoz wrote:
> 
> 
> If ModelBaker can do it (built with CakePHP as the core), I'd imagine
> we can too!  I haven't figured out how to make an iPhone based layout
> yet though so I won't be much help in that department.  :(
> 
> On Feb 9, 2:43 pm, Brett Wilton  wrote:
>> I haven't used it yet but the RequestHandler component has an
>> isMobile() function call that may be enough to help change layouts
>> depending on the device.
>>
>> 
>> Brett Wiltonhttp://wiltonsoftware.co.nz
> > 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/iphone-version-of-my-site-tp2298939p2299441.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



iphone version of my site

2009-02-09 Thread monirr444


i made an iphone version of my site is there any way to put a code in my
index.ctp whenever iphone users go there redirect them to iphone version  or
any other solutions

thank You 

-- 
View this message in context: 
http://n2.nabble.com/iphone-version-of-my-site-tp2298939p2298939.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need help with Views and models

2009-02-09 Thread monirr444


sorry for not giving enough info 
ok here is my categories
index=paging 

options(array('url' => $this->passedArgs)); ?>


>


link(''.$category['Category']['name'].'','/categories/view/'.$category['Category']
['slug'],null,null,false);?>





when i click on this it wont show me the recipes in that category 

and here is the category controller 
Category->recursive = 0;
$this->set('categories', $this->paginate('Category'));
}

function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid Category.', true), 
'default',
array(), 'error');
$this->redirect(array('action'=>'index'));
}
$category = $this->Category->read(null, $id);
$this->set('category', $category);
$this->set('recipesFormAction', '/recipe/add/category/'.$id);
}





and this is my recipes controller 


Recipe->recursive = 2;
$filters = $this->Recipe->getFilters($this->passedArgs);
$this->set('recipes', $this->paginate('Recipe', $filters));
}

function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid Recipe.', true), 
'default', array(),
'error');
$this->redirect(array('action'=>'index'));
}
$recipe = $this->Recipe->read(null, $id);
$this->set('recipe', $recipe);
}

function form($form_action = 'add', $id = null) {
if(!empty($id)){
$recipe = $this->Recipe->read(null, $id);
$this->set('recipe', $recipe);
}
if (!empty($this->data)) {
$this->Recipe->create();
if ($this->Recipe->save($this->data)) {
$this->Session->setFlash(__('The Recipe has 
been saved', true),
'default', array(), 'info');
if(!empty($id)){
$this->redirect(array('action' => 
'view', $id));
}else{
$this->redirect($this->referer());
}
} else {
$this->Session->setFlash(__('The Recipe could 
not be saved. Please, try
again.', true), 'default', array(), 'error');
}
}else{
$this->data = array();
$this->data['Recipe'] = array();
if(!empty($recipe)){
$this->data = $recipe;
}
foreach($this->passedArgs as $fieldName => $value){
$this->data['Recipe'][$fieldName] = $value;
}
}
$categories = $this->Recipe->Category->find('list');
$this->set(compact('categories'));
$form_url = '/' . $this->params['url']['url'];
$this->set('form_url', $form_url);
$this->set('form_action', $form_action);
}



this is my category model


 array(
'overwrite' => false,
'unique' => true,
'case' => 'low',
)


  );


//The Associations below have been created with all possible keys, those
that are not needed can be removed

var $hasMany = array(
'Recipe' => array('className' => 'Recipe',
'foreignKey' => 
'category_id',
'dependent' => 
true,
'conditions' => 
'',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => 
'',
'finderQuery' 
=> '',
'counterQuery' 
=> ''
)
);

}
?>


 which act as $slug
This is my Recipes model


 array('className' => 'Category',
'foreignKey' => 
'category_id',
'conditions' => 
'',
'fields' => '',
 

Re: Help with Complex Find Conditions

2009-02-05 Thread monirr444


Thank you thank you very very much appreciated

















brian-9 wrote:
> 
> 
> My bad. Try this:
> 
> $this->Recipe->find('all', array('conditions' => array(
>   'OR' => array(
> 'Recipe.name LIKE' => '%' . $item . '%',
> 'Recipe.caption LIKE' => '%' . $item . '%'
>   )
> ),
> 'order' => 'Recipe.name',
> 'recursive' => 1
> )
> );
> 
> Aso, set debug to 2 and look at the SELECT Cake is generating.
> 
> On Thu, Feb 5, 2009 at 12:17 PM, monirr444  wrote:
>>
>>
>>
>>
>>
>> function search($item = null) {
>> $item = $this->params['url']['q'];
>>$recipes = $this->Recipe->find('all', array('conditions' => array(
>> 'OR' =>array(
>>  array('Recipe.name LIKE' => '%' . $item . '%',
>>  array('Recipe.caption LIKE' => '%' . $item . '%',
>>
>>'order' =>
>> 'Recipe.name',
>>
>> 'recursive' => 1,
>>   ));
>>
>> i tried put wont give the results as u can see above
>>
>> when i put individual it work lets say  Recipe.ingredients LIKE
>> its show the the result good but only ingredients but i want both
>>
>>
>> thank you very much appreciated
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> brian-9 wrote:
>>>
>>>
>>> try
>>>
>>> 'conditions' => array(
>>> 'OR' => array(
>>> array('Recipe.name LIKE' => '%' . $item . '%'),
>>> array('Recipe.ingredients LIKE' => '%' . $item . '%')
>>> )
>>> )
>>>
>>> On Thu, Feb 5, 2009 at 10:34 AM, monirr444  wrote:
>>>>
>>>>
>>>> function search($item = null) {
>>>>$item = $this->params['url']['q'];
>>>>$recipes = $this->Recipe->find('all', array('conditions'
>>>> =>
>>>> array('Recipe.name LIKE' => '%' . $item . '%'),
>>>>'order' =>
>>>> 'Recipe.name',
>>>>'recursive' => 1,
>>>>   ));
>>>>
>>>>//var_dump($recipes);
>>>>
>>>>if (!$item) {
>>>>$this->Session->setFlash(__('No Search Items
>>>> Found',
>>>> true));
>>>>$this->redirect(array('action'=>'index'));
>>>>}
>>>>
>>>>$this->set('search', $recipes);
>>>>}
>>>>
>>>> this is my  public website search when ever i search it give me results
>>>> by
>>>> name
>>>> how to put 2 condations  so it search by name and ingredients
>>>> i used "OR" but didnt work maybe i used it worng
>>>> like this
>>>>
>>>> "array('Recipe.name LIKE' => '%' . $item . '%'), "
>>>> "array('Recipe.ingredients LIKE' => '%' . $item . '%'), "
>>>> i wanna 2 these whenever i search by name and ingredients it should
>>>> give
>>>> both results
>>>> i looked the cake book i coudnt find any
>>>>
>>>> thank you so much
>>>> --
>>>> View this message in context:
>>>> http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2275441.html
>>>> Sent from the CakePHP mailing list archive at Nabble.com.
>>>>
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2276013.html
>> Sent from the CakePHP mailing list archive at Nabble.com.
>>
>>
>> >
>>
> 
> > 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2276368.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Help with Complex Find Conditions

2009-02-05 Thread monirr444





function search($item = null) {
 $item = $this->params['url']['q'];
$recipes = $this->Recipe->find('all', array('conditions' => array(
'OR' =>array(
 array('Recipe.name LIKE' => '%' . $item . '%',
 array('Recipe.caption LIKE' => '%' . $item . '%',

'order' =>
'Recipe.name',
   
 'recursive' => 1,
   ));

i tried put wont give the results as u can see above 

when i put individual it work lets say  Recipe.ingredients LIKE
its show the the result good but only ingredients but i want both 


thank you very much appreciated 













brian-9 wrote:
> 
> 
> try
> 
> 'conditions' => array(
>     'OR' => array(
> array('Recipe.name LIKE' => '%' . $item . '%'),
> array('Recipe.ingredients LIKE' => '%' . $item . '%')
> )
> )
> 
> On Thu, Feb 5, 2009 at 10:34 AM, monirr444  wrote:
>>
>>
>> function search($item = null) {
>>$item = $this->params['url']['q'];
>>$recipes = $this->Recipe->find('all', array('conditions'
>> =>
>> array('Recipe.name LIKE' => '%' . $item . '%'),
>>'order' =>
>> 'Recipe.name',
>>'recursive' => 1,
>>   ));
>>
>>//var_dump($recipes);
>>
>>if (!$item) {
>>$this->Session->setFlash(__('No Search Items
>> Found',
>> true));
>>$this->redirect(array('action'=>'index'));
>>}
>>
>>$this->set('search', $recipes);
>>}
>>
>> this is my  public website search when ever i search it give me results
>> by
>> name
>> how to put 2 condations  so it search by name and ingredients
>> i used "OR" but didnt work maybe i used it worng
>> like this
>>
>> "array('Recipe.name LIKE' => '%' . $item . '%'), "
>> "array('Recipe.ingredients LIKE' => '%' . $item . '%'), "
>> i wanna 2 these whenever i search by name and ingredients it should give
>> both results
>> i looked the cake book i coudnt find any
>>
>> thank you so much
>> --
>> View this message in context:
>> http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2275441.html
>> Sent from the CakePHP mailing list archive at Nabble.com.
>>
>>
>> >
>>
> 
> > 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2276013.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Help with Complex Find Conditions

2009-02-05 Thread monirr444


function search($item = null) { 
$item = $this->params['url']['q']; 
$recipes = $this->Recipe->find('all', array('conditions' =>
array('Recipe.name LIKE' => '%' . $item . '%'), 
'order' =>
'Recipe.name', 
'recursive' => 1, 
   )); 

//var_dump($recipes); 

if (!$item) { 
$this->Session->setFlash(__('No Search Items Found',
true)); 
$this->redirect(array('action'=>'index')); 
} 

$this->set('search', $recipes); 
} 

this is my  public website search when ever i search it give me results by
name 
how to put 2 condations  so it search by name and ingredients 
i used "OR" but didnt work maybe i used it worng 
like this 

"array('Recipe.name LIKE' => '%' . $item . '%'), " 
"array('Recipe.ingredients LIKE' => '%' . $item . '%'), " 
i wanna 2 these whenever i search by name and ingredients it should give
both results 
i looked the cake book i coudnt find any 

thank you so much 
-- 
View this message in context: 
http://n2.nabble.com/Help-with-Complex-Find-Conditions-tp2275441p2275441.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---