Re: Implementing a search functionality

2011-11-02 Thread WebbedIT
And for proof of how easy other people find the CakeDC plugin:
http://groups.google.com/group/cake-php/browse_thread/thread/bdb93d2ec770be06

Question asked and resolved in 4 days!

HTH, Paul.

On Nov 2, 9:23 am, WebbedIT  wrote:
> @Yves: People keep recommending paginaton along with CakeDC's
> searchable plugin.  If you take their advice and go and read the
> associated documentation you should easily be able to figure this out
> for yourself.
>
> At present you have still not got your head around the fact that you
> only need to run $this->paginate() and it returns BOTH the limited
> results you requested AND supply's the paginate helper with all the
> info it needs to create pagination links.
>
> Please go back and read the very good documentation because a lot of
> people have been trying to support you with this for over 3 weeks now
> and you're making very little progress, even though the procedures
> involved are relatively simple.
>
> http://book.cakephp.org/view/1231/Paginationhttps://github.com/CakeDC/search
>
> HTH, Paul.
>
> On Nov 2, 4:13 am, rchavik  wrote:
>
>
>
>
>
>
>
> > On Wednesday, November 2, 2011 10:29:04 AM UTC+7, Yves S. Garret wrote:
>
> > > Where should the processing happen, controller or view?
>
> > Controller.  See:http://book.cakephp.org/view/1232/Controller-Setup
>
> > > Also, why is the second provider started with an upper-case letter?
>
> > I assume you're referring to: $this->set('provider', $this->paginate(*
> > 'Provider'*, $conditions));
>
> > See:http://api13.cakephp.org/class/controller#method-Controllerpaginate

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-02 Thread WebbedIT
@Yves: People keep recommending paginaton along with CakeDC's
searchable plugin.  If you take their advice and go and read the
associated documentation you should easily be able to figure this out
for yourself.

At present you have still not got your head around the fact that you
only need to run $this->paginate() and it returns BOTH the limited
results you requested AND supply's the paginate helper with all the
info it needs to create pagination links.

Please go back and read the very good documentation because a lot of
people have been trying to support you with this for over 3 weeks now
and you're making very little progress, even though the procedures
involved are relatively simple.

http://book.cakephp.org/view/1231/Pagination
https://github.com/CakeDC/search

HTH, Paul.

On Nov 2, 4:13 am, rchavik  wrote:
> On Wednesday, November 2, 2011 10:29:04 AM UTC+7, Yves S. Garret wrote:
>
> > Where should the processing happen, controller or view?
>
> Controller.  See:http://book.cakephp.org/view/1232/Controller-Setup
>
> > Also, why is the second provider started with an upper-case letter?
>
> I assume you're referring to: $this->set('provider', $this->paginate(*
> 'Provider'*, $conditions));
>
> See:http://api13.cakephp.org/class/controller#method-Controllerpaginate

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread rchavik


On Wednesday, November 2, 2011 10:29:04 AM UTC+7, Yves S. Garret wrote:
>
> Where should the processing happen, controller or view? 
>

Controller.  See: http://book.cakephp.org/view/1232/Controller-Setup 
 

> Also, why is the second provider started with an upper-case letter?
>

I assume you're referring to: $this->set('provider', $this->paginate(*
'Provider'*, $conditions)); 

See: http://api13.cakephp.org/class/controller#method-Controllerpaginate 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Yves
Where should the processing happen, controller or view?  Also, why is the 
second provider started with an upper-case letter?

On Nov 1, 2011, at 10:25 PM, rchavik  wrote:

> On Wednesday, November 2, 2011 3:00:01 AM UTC+7, Yves S. Garret wrote:
> if(!empty($this->data['Provider']['last_name'])) {
> $this->set('provider', $this->Provider->find('all', 
> 
> array('conditions' => 
> array(
> 
> 'Provider.last_name LIKE' => $this->data['Provider']['last_name'].'%';
> }
> 
> Hmm, the find() will return all data. To enable pagination, the result must 
> be processed by Controller::paginate()
> 
> $this->set('provider', $this->paginate('Provider', $conditions));
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread rchavik
On Wednesday, November 2, 2011 3:00:01 AM UTC+7, Yves S. Garret wrote:

> if(!empty($this->data['Provider']['last_name'])) {
> $this->set('provider', $this->Provider->find('all', 
> 
> array('conditions' => 
> array(
> 
> 'Provider.last_name LIKE' => $this->data['Provider']['last_name'].'%';
> }
>

Hmm, the find() will return all data. To enable pagination, the result must 
be processed by Controller::paginate()

$this->set('provider', $this->paginate('Provider', $conditions));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread rchavik
I highly recommend to take a look at cakedc's search 
plugin. 
It's a little more involved to setup but worth the trouble to learn and use.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, this is weird.  It does pagination, which is good.  The problem arises
is that when I run the search, after it it runs again, for all of the names
in the DB... on the first page the search results are displayed, but on the
next, the rest of the data is displayed!  Does pagination run some other
search in the background or after the fact?  This is weird, please help out.

On Tue, Nov 1, 2011 at 4:00 PM, Yves S. Garret
wrote:

> Ok, as I have it works.  Yay!
>
> The thing that was tripping me up was that the pagination ran _after_ the
> search.
>
> This is how view_admit_lookup is now.
>
> function view_admit_lookup() {
> $this->helpers['Paginator'] = array('ajax' => 'ajax');
> // provide pagination for the user.
> $this->set('provider', $this->paginate());
>
> // here we begin searching for whatever we need.
> if(!empty($this->data['Provider']['last_name'])) {
> $this->set('provider', $this->Provider->find('all',
>
> array('conditions' =>
> array(
>
> 'Provider.last_name LIKE' => $this->data['Provider']['last_name'].'%';
> }
>
> // set the title and the default layout.
> $this->set('title_for_layout', 'Admit Lookup');
> $this->layout = 'default';
> }
>
> On Tue, Nov 1, 2011 at 1:10 PM, Yves S. Garret  > wrote:
>
>> Ok, one more time!
>>
>> This is my view:
>> http://bin.cakephp.org/view/859204807
>> My model:
>> http://bin.cakephp.org/view/455436825
>> My controller:
>> http://bin.cakephp.org/view/2083728780
>>
>> Now, what happens is that when I run a search for, say, Smith, the page
>> just refreshes with all of the stuff as it was.  I inserted debug code
>> (lines 31 & 32) in the if-statement just to see what was going on and turns
>> out nothing was going >_>
>>
>> Should I run this after the pagination?
>>
>>
>> On Tue, Nov 1, 2011 at 11:29 AM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> You're right of course. Now if you are American, it would be ironic that
>>> you understand sarcasm (or irony)!
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 1 Nov 2011, at 15:22, Jon Bennett wrote:
>>>
>>> I hope we all know that I was being ironic. ^^
>>>
>>>
>>> Don't think that's irony, more sarcasm ;)
>>>
>>> j
>>>
>>> --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> 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
>>>
>>>
>>>  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and
>>> help others with their CakePHP related questions.
>>>
>>>
>>> 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
>>>
>>
>>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, as I have it works.  Yay!

The thing that was tripping me up was that the pagination ran _after_ the
search.

This is how view_admit_lookup is now.

function view_admit_lookup() {
$this->helpers['Paginator'] = array('ajax' => 'ajax');
// provide pagination for the user.
$this->set('provider', $this->paginate());

// here we begin searching for whatever we need.
if(!empty($this->data['Provider']['last_name'])) {
$this->set('provider', $this->Provider->find('all',

array('conditions' =>
array(

'Provider.last_name LIKE' => $this->data['Provider']['last_name'].'%';
}

// set the title and the default layout.
$this->set('title_for_layout', 'Admit Lookup');
$this->layout = 'default';
}

On Tue, Nov 1, 2011 at 1:10 PM, Yves S. Garret
wrote:

> Ok, one more time!
>
> This is my view:
> http://bin.cakephp.org/view/859204807
> My model:
> http://bin.cakephp.org/view/455436825
> My controller:
> http://bin.cakephp.org/view/2083728780
>
> Now, what happens is that when I run a search for, say, Smith, the page
> just refreshes with all of the stuff as it was.  I inserted debug code
> (lines 31 & 32) in the if-statement just to see what was going on and turns
> out nothing was going >_>
>
> Should I run this after the pagination?
>
>
> On Tue, Nov 1, 2011 at 11:29 AM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> You're right of course. Now if you are American, it would be ironic that
>> you understand sarcasm (or irony)!
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 1 Nov 2011, at 15:22, Jon Bennett wrote:
>>
>> I hope we all know that I was being ironic. ^^
>>
>>
>> Don't think that's irony, more sarcasm ;)
>>
>> j
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> 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
>>
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> 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
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
Ok, one more time!

This is my view:
http://bin.cakephp.org/view/859204807
My model:
http://bin.cakephp.org/view/455436825
My controller:
http://bin.cakephp.org/view/2083728780

Now, what happens is that when I run a search for, say, Smith, the page
just refreshes with all of the stuff as it was.  I inserted debug code
(lines 31 & 32) in the if-statement just to see what was going on and turns
out nothing was going >_>

Should I run this after the pagination?

On Tue, Nov 1, 2011 at 11:29 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> You're right of course. Now if you are American, it would be ironic that
> you understand sarcasm (or irony)!
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 15:22, Jon Bennett wrote:
>
> I hope we all know that I was being ironic. ^^
>
>
> Don't think that's irony, more sarcasm ;)
>
> j
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Jeremy Burns | Class Outfit
You're right of course. Now if you are American, it would be ironic that you 
understand sarcasm (or irony)!

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 1 Nov 2011, at 15:22, Jon Bennett wrote:

>> I hope we all know that I was being ironic. ^^
> 
> Don't think that's irony, more sarcasm ;)
> 
> j
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Jon Bennett
> I hope we all know that I was being ironic. ^^

Don't think that's irony, more sarcasm ;)

j

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread Yves S. Garret
It would've worked better if there indeed wasn't a Joogle out there :-) .

On Tue, Nov 1, 2011 at 1:31 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> I hope we all know that I was being ironic. ^^
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 03:48, Yves wrote:
>
> There actually is a search engine plugin called joogle.
>
> On Oct 31, 2011, at 11:20 PM, Ryan Schmidt 
> wrote:
>
>
> On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote:
>
>
> I didn't search there. I used another little know search engine called
> Joogle (or something like that):
>
>
> You probably meant "Google".
>
>
>
> --
>
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
>
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
>
> 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
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-11-01 Thread WebbedIT
Me thinks Jeremy has been reading too many of Andy's replies :P

On Nov 1, 5:31 am, Jeremy Burns | Class Outfit
 wrote:
> I hope we all know that I was being ironic. ^^
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 1 Nov 2011, at 03:48, Yves wrote:
>
>
>
>
>
>
>
> > There actually is a search engine plugin called joogle.
>
> > On Oct 31, 2011, at 11:20 PM, Ryan Schmidt  
> > wrote:
>
> >> On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote:
>
> >>> I didn't search there. I used another little know search engine called 
> >>> Joogle (or something like that):
>
> >> You probably meant "Google".
>
> >> --
> >> Our newest site for the community: CakePHP Video 
> >> Tutorialshttp://tv.cakephp.org
> >> Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> >> others with their CakePHP related questions.
>
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> athttp://groups.google.com/group/cake-php
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-31 Thread Jeremy Burns | Class Outfit
I hope we all know that I was being ironic. ^^

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 1 Nov 2011, at 03:48, Yves wrote:

> There actually is a search engine plugin called joogle.
> 
> On Oct 31, 2011, at 11:20 PM, Ryan Schmidt  wrote:
> 
>> 
>> On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote:
>> 
>>> I didn't search there. I used another little know search engine called 
>>> Joogle (or something like that):
>> 
>> You probably meant "Google".
>> 
>> 
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>> 
>> 
>> 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
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-31 Thread Yves
There actually is a search engine plugin called joogle.

On Oct 31, 2011, at 11:20 PM, Ryan Schmidt  wrote:

> 
> On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote:
> 
>> I didn't search there. I used another little know search engine called 
>> Joogle (or something like that):
> 
> You probably meant "Google".
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-31 Thread Ryan Schmidt

On Oct 31, 2011, at 08:45, Jeremy Burns | Class Outfit wrote:

> I didn't search there. I used another little know search engine called Joogle 
> (or something like that):

You probably meant "Google".


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
Yes, they're wrong.  But being new I was sure how correct/incorrect my
approach was.  I'm working off of the stuff of another developer (who made
the said file names).

This is what I have setup now:

app\
  controllers\
providers_controller.php
  models\
provider.php
  views\
providers\
  view_admit_lookup.ctp

provider.php:
http://bin.cakephp.org/view/1833911095
providers_controller.php:
http://bin.cakephp.org/view/566732842
view_admit_lookup.ctp:
http://bin.cakephp.org/view/1947492040



On Tue, Oct 25, 2011 at 10:10 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Why. Not. Read. My. Post? And the guide? With the link I sent you?
>
> From this tree I can tell you that the model file should be lower case and
> that view is not named correctly. Lower case, with underscores, to match the
> controller function name (as I mention in my post(s)).
>
> Once you have read the answers to your questions, applied the advice and
> adhered to conventions, please come back with any other errors.
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 25 Oct 2011, at 14:19, Yves S. Garret wrote:
>
> This time I'll include the file names and where they are:
>
> app\
>   controllers\
> providers_controller.php (has ProvidersController class)
>   models\
> Provider.php (has Provider class)
>   views\
> providers\
>   viewAdmitLookup.ctp (contains all of the view display stuff)
>
> On Tue, Oct 25, 2011 at 9:16 AM, Yves S. Garret <
> yoursurrogate...@gmail.com> wrote:
>
>> Thanks, this is the structure of my directory tree, tell me if I need to
>> re-name anything:
>>
>> app\
>>   controllers\
>>   models\
>>   views\
>> providers\
>>
>> Should I rename the providers directory to provider?
>>
>>
>> On Mon, Oct 24, 2011 at 11:33 PM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> Your conventions are all over the place. Its best to stick to them.
>>>
>>> Did you change the code inside the controller as suggested in my first
>>> post?
>>>
>>>
>>>1. class ProvidersController extends AppController {
>>>2. var $name = 'Providers';
>>>
>>>
>>> The filename is view_admit_lookup, yet the controller function is
>>> viewAdmitLookup - they should match. Change the function name to
>>> view_admit_lookup
>>>
>>> In the view, you have this:
>>>
>>> echo  $form->create("Providers", 
>>> array
>>> ('action' => 'search'));
>>>
>>> It'll create a form that tries to find the Providers model, not the
>>> Provider model. Change it to:
>>>
>>> echo  $form->create("Provider", 
>>> array
>>> ('action' => 'search'));
>>>
>>> Change Providers to Provider throughout the view code.
>>>
>>> In your controller function you have $this->set('providers'... which
>>> sends a variable $providers into the view, yet in the view you are iterating
>>> through a variable called $Providers. Change the variable in the view to
>>> $providers.
>>>
>>> Your are using $form-> when you should be using $this->Form (that's the
>>> syntax for helpers in general, so $this->Html etc).
>>>
>>> See this section of the book on conventions:
>>>
>>> http://book.cakephp.org/view/901/CakePHP-Conventions
>>>
>>> You can deviate from them with additional work, but it is not worth the
>>> effort else you'll run into issues like this.
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 24 Oct 2011, at 22:39, Yves S. Garret wrote:
>>>
>>> Ok, now I'm getting this when I turned everything to plural.
>>>
>>>  Missing Controller
>>>
>>> *Error: **ProviderController* could not be found.
>>>
>>> *Error: *Create the class *ProviderController* below in file:
>>> app\controllers\provider_controller.php
>>>
>>> >> class ProviderController extends AppController {
>>>
>>> var $name = 'Provider';
>>> }
>>> ?>
>>>
>>> *Notice: *If you want to customize this error message, create
>>> app\views\errors\missing_controller.ctp
>>>
>>>
>>> Model:
>>>
>>> http://bin.cakephp.org/view/361596401
>>>
>>> View:
>>>
>>> http://bin.cakephp.org/view/1786526282
>>>
>>> Controller:
>>>
>>> http://bin.cakephp.org/view/1385185838
>>>
>>> On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret <
>>> yoursurrogate...@gmail.com> wrote:
>>>
 Yup.  CakePHP 1.3.  The view is in
 \app\views\providers\view_admit_lookup.ctp

 The controller file name is providers_controller.php.  I added the
 variable that you suggested to the model file (which is called 
 Provider.php)
 and I get the same error :-( .


 On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit <
 jeremybu...@classoutfit.com> wrote:

> Did you change anything? This is 1.3, right?
>
> The filename should be providers_controller.php
> Change the code as per my post below.
> The view should be in /app/views/providers/
> Add $var $name = 'Provi

Re: Implementing a search functionality

2011-10-25 Thread Jeremy Burns | Class Outfit
Why. Not. Read. My. Post? And the guide? With the link I sent you?

>From this tree I can tell you that the model file should be lower case and 
>that view is not named correctly. Lower case, with underscores, to match the 
>controller function name (as I mention in my post(s)).

Once you have read the answers to your questions, applied the advice and 
adhered to conventions, please come back with any other errors.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 25 Oct 2011, at 14:19, Yves S. Garret wrote:

> This time I'll include the file names and where they are:
> 
> app\
>   controllers\
> providers_controller.php (has ProvidersController class)
>   models\
> Provider.php (has Provider class)
>   views\
> providers\
>   viewAdmitLookup.ctp (contains all of the view display stuff)
> 
> On Tue, Oct 25, 2011 at 9:16 AM, Yves S. Garret  
> wrote:
> Thanks, this is the structure of my directory tree, tell me if I need to 
> re-name anything:
> 
> app\
>   controllers\
>   models\
>   views\
> providers\
> 
> Should I rename the providers directory to provider?
> 
> 
> On Mon, Oct 24, 2011 at 11:33 PM, Jeremy Burns | Class Outfit 
>  wrote:
> Your conventions are all over the place. Its best to stick to them.
> 
> Did you change the code inside the controller as suggested in my first post?
> 
> class ProvidersController extends AppController {
> var $name = 'Providers';
> 
> The filename is view_admit_lookup, yet the controller function is 
> viewAdmitLookup - they should match. Change the function name to 
> view_admit_lookup
> 
> In the view, you have this:
> 
> echo $form->create("Providers", array('action' => 'search'));
> 
> It'll create a form that tries to find the Providers model, not the Provider 
> model. Change it to:
> 
> echo $form->create("Provider", array('action' => 'search'));
> 
> Change Providers to Provider throughout the view code.
> 
> In your controller function you have $this->set('providers'... which sends a 
> variable $providers into the view, yet in the view you are iterating through 
> a variable called $Providers. Change the variable in the view to $providers.
> 
> Your are using $form-> when you should be using $this->Form (that's the 
> syntax for helpers in general, so $this->Html etc).
> 
> See this section of the book on conventions:
> 
> http://book.cakephp.org/view/901/CakePHP-Conventions
> 
> You can deviate from them with additional work, but it is not worth the 
> effort else you'll run into issues like this.
> 
> 
> Jeremy Burns
> Class Outfit
> 
> http://www.classoutfit.com
> 
> On 24 Oct 2011, at 22:39, Yves S. Garret wrote:
> 
>> Ok, now I'm getting this when I turned everything to plural.
>> 
>> Missing Controller
>> 
>> Error: ProviderController could not be found.
>> 
>> Error: Create the class ProviderController below in file: 
>> app\controllers\provider_controller.php
>> 
>> > class ProviderController extends AppController {
>> 
>>  var $name = 'Provider';
>> }
>> ?>
>> Notice: If you want to customize this error message, create 
>> app\views\errors\missing_controller.ctp
>> 
>> 
>> 
>> Model:
>> 
>> http://bin.cakephp.org/view/361596401
>> 
>> View:
>> 
>> http://bin.cakephp.org/view/1786526282
>> 
>> Controller:
>> 
>> http://bin.cakephp.org/view/1385185838
>> 
>> 
>> On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret  
>> wrote:
>> Yup.  CakePHP 1.3.  The view is in \app\views\providers\view_admit_lookup.ctp
>> 
>> The controller file name is providers_controller.php.  I added the variable 
>> that you suggested to the model file (which is called Provider.php) and I 
>> get the same error :-( .
>> 
>> 
>> On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit 
>>  wrote:
>> Did you change anything? This is 1.3, right?
>> 
>> The filename should be providers_controller.php
>> Change the code as per my post below.
>> The view should be in /app/views/providers/
>> Add $var $name = 'Provider'; to the beginning of the Provider model file.
>> 
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> http://www.classoutfit.com
>> 
>> On 24 Oct 2011, at 18:40, Yves S. Garret wrote:
>> 
>>> This is my view:
>>> http://bin.cakephp.org/view/1913574686
>>> This is my controller:
>>> http://bin.cakephp.org/view/1556854836
>>> This is my model:
>>> http://bin.cakephp.org/view/416003093
>>> 
>>> This is the error that I'm getting:
>>> Missing Controller
>>> 
>>> Error: ProviderController could not be found.
>>> 
>>> Error: Create the class ProviderController below in file: 
>>> app\controllers\provider_controller.php
>>> 
>>> >> class ProviderController extends AppController {
>>> 
>>> var $name = 'Provider';
>>> }
>>> ?>
>>> Notice: If you want to customize this error message, create 
>>> app\views\errors\missing_controller.ctp
>>> 
>>> 
>>> 
>>> :-/
>>> 
>>> 
>>> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit 
>>>  wrote:
>>> Your controller names should be plural; try:
>>> 
>>> class ProvidersController extends AppControl

Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
This time I'll include the file names and where they are:

app\
  controllers\
providers_controller.php (has ProvidersController class)
  models\
Provider.php (has Provider class)
  views\
providers\
  viewAdmitLookup.ctp (contains all of the view display stuff)

On Tue, Oct 25, 2011 at 9:16 AM, Yves S. Garret
wrote:

> Thanks, this is the structure of my directory tree, tell me if I need to
> re-name anything:
>
> app\
>   controllers\
>   models\
>   views\
> providers\
>
> Should I rename the providers directory to provider?
>
>
> On Mon, Oct 24, 2011 at 11:33 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> Your conventions are all over the place. Its best to stick to them.
>>
>> Did you change the code inside the controller as suggested in my first
>> post?
>>
>>
>>1. class ProvidersController extends AppController {
>>2. var $name = 'Providers';
>>
>>
>> The filename is view_admit_lookup, yet the controller function is
>> viewAdmitLookup - they should match. Change the function name to
>> view_admit_lookup
>>
>> In the view, you have this:
>>
>> echo  $form->create("Providers", 
>> array
>> ('action' => 'search'));
>>
>> It'll create a form that tries to find the Providers model, not the
>> Provider model. Change it to:
>>
>> echo  $form->create("Provider", 
>> array
>> ('action' => 'search'));
>>
>> Change Providers to Provider throughout the view code.
>>
>> In your controller function you have $this->set('providers'... which sends
>> a variable $providers into the view, yet in the view you are iterating
>> through a variable called $Providers. Change the variable in the view to
>> $providers.
>>
>> Your are using $form-> when you should be using $this->Form (that's the
>> syntax for helpers in general, so $this->Html etc).
>>
>> See this section of the book on conventions:
>>
>> http://book.cakephp.org/view/901/CakePHP-Conventions
>>
>> You can deviate from them with additional work, but it is not worth the
>> effort else you'll run into issues like this.
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 24 Oct 2011, at 22:39, Yves S. Garret wrote:
>>
>> Ok, now I'm getting this when I turned everything to plural.
>>
>>  Missing Controller
>>
>> *Error: **ProviderController* could not be found.
>>
>> *Error: *Create the class *ProviderController* below in file:
>> app\controllers\provider_controller.php
>>
>> > class ProviderController extends AppController {
>>
>>  var $name = 'Provider';
>> }
>> ?>
>>
>> *Notice: *If you want to customize this error message, create
>> app\views\errors\missing_controller.ctp
>>
>>
>> Model:
>>
>> http://bin.cakephp.org/view/361596401
>>
>> View:
>>
>> http://bin.cakephp.org/view/1786526282
>>
>> Controller:
>>
>> http://bin.cakephp.org/view/1385185838
>>
>> On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret <
>> yoursurrogate...@gmail.com> wrote:
>>
>>> Yup.  CakePHP 1.3.  The view is in
>>> \app\views\providers\view_admit_lookup.ctp
>>>
>>> The controller file name is providers_controller.php.  I added the
>>> variable that you suggested to the model file (which is called Provider.php)
>>> and I get the same error :-( .
>>>
>>>
>>> On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit <
>>> jeremybu...@classoutfit.com> wrote:
>>>
 Did you change anything? This is 1.3, right?

 The filename should be providers_controller.php
 Change the code as per my post below.
 The view should be in /app/views/providers/
 Add $var $name = 'Provider'; to the beginning of the Provider model
 file.


 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com

 On 24 Oct 2011, at 18:40, Yves S. Garret wrote:

 This is my view:
 http://bin.cakephp.org/view/1913574686
 This is my controller:
 http://bin.cakephp.org/view/1556854836
 This is my model:
 http://bin.cakephp.org/view/416003093

 This is the error that I'm getting:
 Missing Controller

 *Error: **ProviderController* could not be found.

 *Error: *Create the class *ProviderController* below in file:
 app\controllers\provider_controller.php

 >>> class ProviderController extends AppController {

var $name = 'Provider';
 }
 ?>

 *Notice: *If you want to customize this error message, create
 app\views\errors\missing_controller.ctp


 :-/

 On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit <
 jeremybu...@classoutfit.com> wrote:

> Your controller names should be plural; try:
>
>
>1. class ProvidersController extends AppController {
>2. var $name = 'Providers';
>
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 24 Oct 2011, at 18:24, Yves S. Garret w

Re: Implementing a search functionality

2011-10-25 Thread Yves S. Garret
Thanks, this is the structure of my directory tree, tell me if I need to
re-name anything:

app\
  controllers\
  models\
  views\
providers\

Should I rename the providers directory to provider?

On Mon, Oct 24, 2011 at 11:33 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Your conventions are all over the place. Its best to stick to them.
>
> Did you change the code inside the controller as suggested in my first
> post?
>
>
>1. class ProvidersController extends AppController {
>2. var $name = 'Providers';
>
>
> The filename is view_admit_lookup, yet the controller function is
> viewAdmitLookup - they should match. Change the function name to
> view_admit_lookup
>
> In the view, you have this:
>
> echo  $form->create("Providers", 
> array
> ('action' => 'search'));
>
> It'll create a form that tries to find the Providers model, not the
> Provider model. Change it to:
>
> echo  $form->create("Provider", 
> array
> ('action' => 'search'));
>
> Change Providers to Provider throughout the view code.
>
> In your controller function you have $this->set('providers'... which sends
> a variable $providers into the view, yet in the view you are iterating
> through a variable called $Providers. Change the variable in the view to
> $providers.
>
> Your are using $form-> when you should be using $this->Form (that's the
> syntax for helpers in general, so $this->Html etc).
>
> See this section of the book on conventions:
>
> http://book.cakephp.org/view/901/CakePHP-Conventions
>
> You can deviate from them with additional work, but it is not worth the
> effort else you'll run into issues like this.
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 24 Oct 2011, at 22:39, Yves S. Garret wrote:
>
> Ok, now I'm getting this when I turned everything to plural.
>
> Missing Controller
>
> *Error: **ProviderController* could not be found.
>
> *Error: *Create the class *ProviderController* below in file:
> app\controllers\provider_controller.php
>
>  class ProviderController extends AppController {
>
>   var $name = 'Provider';
> }
> ?>
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_controller.ctp
>
>
> Model:
>
> http://bin.cakephp.org/view/361596401
>
> View:
>
> http://bin.cakephp.org/view/1786526282
>
> Controller:
>
> http://bin.cakephp.org/view/1385185838
>
> On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret <
> yoursurrogate...@gmail.com> wrote:
>
>> Yup.  CakePHP 1.3.  The view is in
>> \app\views\providers\view_admit_lookup.ctp
>>
>> The controller file name is providers_controller.php.  I added the
>> variable that you suggested to the model file (which is called Provider.php)
>> and I get the same error :-( .
>>
>>
>> On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> Did you change anything? This is 1.3, right?
>>>
>>> The filename should be providers_controller.php
>>> Change the code as per my post below.
>>> The view should be in /app/views/providers/
>>> Add $var $name = 'Provider'; to the beginning of the Provider model file.
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 24 Oct 2011, at 18:40, Yves S. Garret wrote:
>>>
>>> This is my view:
>>> http://bin.cakephp.org/view/1913574686
>>> This is my controller:
>>> http://bin.cakephp.org/view/1556854836
>>> This is my model:
>>> http://bin.cakephp.org/view/416003093
>>>
>>> This is the error that I'm getting:
>>> Missing Controller
>>>
>>> *Error: **ProviderController* could not be found.
>>>
>>> *Error: *Create the class *ProviderController* below in file:
>>> app\controllers\provider_controller.php
>>>
>>> >> class ProviderController extends AppController {
>>>
>>> var $name = 'Provider';
>>> }
>>> ?>
>>>
>>> *Notice: *If you want to customize this error message, create
>>> app\views\errors\missing_controller.ctp
>>>
>>>
>>> :-/
>>>
>>> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit <
>>> jeremybu...@classoutfit.com> wrote:
>>>
 Your controller names should be plural; try:


1. class ProvidersController extends AppController {
2. var $name = 'Providers';



 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com

 On 24 Oct 2011, at 18:24, Yves S. Garret wrote:

 Ok, this is weird.

 I found this tutorial on doing searches.
 http://mrphp.com.au/code/search-forms-cakephp

 That's good.  Now, this is my Model:
 http://bin.cakephp.org/view/1495255597
 View:
 http://bin.cakephp.org/view/814828491
  Controller:
 http://bin.cakephp.org/view/1212386780

 Now, when I run the search based on someone, I get something like this:
  Missing Controller

 *Error: **ProvidersController* could not be found.

 *E

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your conventions are all over the place. Its best to stick to them.

Did you change the code inside the controller as suggested in my first post?

class ProvidersController extends AppController {
var $name = 'Providers';

The filename is view_admit_lookup, yet the controller function is 
viewAdmitLookup - they should match. Change the function name to 
view_admit_lookup

In the view, you have this:

echo $form->create("Providers", array('action' => 'search'));

It'll create a form that tries to find the Providers model, not the Provider 
model. Change it to:

echo $form->create("Provider", array('action' => 'search'));

Change Providers to Provider throughout the view code.

In your controller function you have $this->set('providers'... which sends a 
variable $providers into the view, yet in the view you are iterating through a 
variable called $Providers. Change the variable in the view to $providers.

Your are using $form-> when you should be using $this->Form (that's the syntax 
for helpers in general, so $this->Html etc).

See this section of the book on conventions:

http://book.cakephp.org/view/901/CakePHP-Conventions

You can deviate from them with additional work, but it is not worth the effort 
else you'll run into issues like this.


Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 24 Oct 2011, at 22:39, Yves S. Garret wrote:

> Ok, now I'm getting this when I turned everything to plural.
> 
> Missing Controller
> 
> Error: ProviderController could not be found.
> 
> Error: Create the class ProviderController below in file: 
> app\controllers\provider_controller.php
> 
>  class ProviderController extends AppController {
> 
>   var $name = 'Provider';
> }
> ?>
> Notice: If you want to customize this error message, create 
> app\views\errors\missing_controller.ctp
> 
> 
> 
> Model:
> 
> http://bin.cakephp.org/view/361596401
> 
> View:
> 
> http://bin.cakephp.org/view/1786526282
> 
> Controller:
> 
> http://bin.cakephp.org/view/1385185838
> 
> 
> On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret  
> wrote:
> Yup.  CakePHP 1.3.  The view is in \app\views\providers\view_admit_lookup.ctp
> 
> The controller file name is providers_controller.php.  I added the variable 
> that you suggested to the model file (which is called Provider.php) and I get 
> the same error :-( .
> 
> 
> On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit 
>  wrote:
> Did you change anything? This is 1.3, right?
> 
> The filename should be providers_controller.php
> Change the code as per my post below.
> The view should be in /app/views/providers/
> Add $var $name = 'Provider'; to the beginning of the Provider model file.
> 
> 
> Jeremy Burns
> Class Outfit
> 
> http://www.classoutfit.com
> 
> On 24 Oct 2011, at 18:40, Yves S. Garret wrote:
> 
>> This is my view:
>> http://bin.cakephp.org/view/1913574686
>> This is my controller:
>> http://bin.cakephp.org/view/1556854836
>> This is my model:
>> http://bin.cakephp.org/view/416003093
>> 
>> This is the error that I'm getting:
>> Missing Controller
>> 
>> Error: ProviderController could not be found.
>> 
>> Error: Create the class ProviderController below in file: 
>> app\controllers\provider_controller.php
>> 
>> > class ProviderController extends AppController {
>> 
>>  var $name = 'Provider';
>> }
>> ?>
>> Notice: If you want to customize this error message, create 
>> app\views\errors\missing_controller.ctp
>> 
>> 
>> 
>> :-/
>> 
>> 
>> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit 
>>  wrote:
>> Your controller names should be plural; try:
>> 
>> class ProvidersController extends AppController {
>> var $name = 'Providers';
>> 
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> http://www.classoutfit.com
>> 
>> On 24 Oct 2011, at 18:24, Yves S. Garret wrote:
>> 
>>> Ok, this is weird.
>>> 
>>> I found this tutorial on doing searches.
>>> http://mrphp.com.au/code/search-forms-cakephp
>>> 
>>> That's good.  Now, this is my Model:
>>> http://bin.cakephp.org/view/1495255597
>>> View:
>>> http://bin.cakephp.org/view/814828491
>>> Controller:
>>> http://bin.cakephp.org/view/1212386780
>>> 
>>> Now, when I run the search based on someone, I get something like this:
>>> Missing Controller
>>> 
>>> Error: ProvidersController could not be found.
>>> 
>>> Error: Create the class ProvidersController below in file: 
>>> app\controllers\providers_controller.php
>>> 
>>> >> class ProvidersController extends AppController {
>>> 
>>> var $name = 'Providers';
>>> }
>>> ?>
>>> Notice: If you want to customize this error message, create 
>>> app\views\errors\missing_controller.ctp
>>> 
>>> Now, I don't have Providers, I have Provider (singular only), so where is 
>>> it getting the plural from?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret 
>>>  wrote:
>>> My question in that case would be, why am I getting that error?
>>> 
>>> 
>>> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret 
>>>  wrote:
>>> I have a decen

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, now I'm getting this when I turned everything to plural.

Missing Controller

*Error: **ProviderController* could not be found.

*Error: *Create the class *ProviderController* below in file:
app\controllers\provider_controller.php



*Notice: *If you want to customize this error message, create
app\views\errors\missing_controller.ctp


Model:

http://bin.cakephp.org/view/361596401

View:

http://bin.cakephp.org/view/1786526282

Controller:

http://bin.cakephp.org/view/1385185838

On Mon, Oct 24, 2011 at 4:56 PM, Yves S. Garret
wrote:

> Yup.  CakePHP 1.3.  The view is in
> \app\views\providers\view_admit_lookup.ctp
>
> The controller file name is providers_controller.php.  I added the variable
> that you suggested to the model file (which is called Provider.php) and I
> get the same error :-( .
>
>
> On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> Did you change anything? This is 1.3, right?
>>
>> The filename should be providers_controller.php
>> Change the code as per my post below.
>> The view should be in /app/views/providers/
>> Add $var $name = 'Provider'; to the beginning of the Provider model file.
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 24 Oct 2011, at 18:40, Yves S. Garret wrote:
>>
>> This is my view:
>> http://bin.cakephp.org/view/1913574686
>> This is my controller:
>> http://bin.cakephp.org/view/1556854836
>> This is my model:
>> http://bin.cakephp.org/view/416003093
>>
>> This is the error that I'm getting:
>> Missing Controller
>>
>> *Error: **ProviderController* could not be found.
>>
>> *Error: *Create the class *ProviderController* below in file:
>> app\controllers\provider_controller.php
>>
>> > class ProviderController extends AppController {
>>
>>  var $name = 'Provider';
>> }
>> ?>
>>
>> *Notice: *If you want to customize this error message, create
>> app\views\errors\missing_controller.ctp
>>
>>
>> :-/
>>
>> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit <
>> jeremybu...@classoutfit.com> wrote:
>>
>>> Your controller names should be plural; try:
>>>
>>>
>>>1. class ProvidersController extends AppController {
>>>2. var $name = 'Providers';
>>>
>>>
>>>
>>> Jeremy Burns
>>> Class Outfit
>>>
>>> http://www.classoutfit.com
>>>
>>> On 24 Oct 2011, at 18:24, Yves S. Garret wrote:
>>>
>>> Ok, this is weird.
>>>
>>> I found this tutorial on doing searches.
>>> http://mrphp.com.au/code/search-forms-cakephp
>>>
>>> That's good.  Now, this is my Model:
>>> http://bin.cakephp.org/view/1495255597
>>> View:
>>> http://bin.cakephp.org/view/814828491
>>>  Controller:
>>> http://bin.cakephp.org/view/1212386780
>>>
>>> Now, when I run the search based on someone, I get something like this:
>>>  Missing Controller
>>>
>>> *Error: **ProvidersController* could not be found.
>>>
>>> *Error: *Create the class *ProvidersController* below in file:
>>> app\controllers\providers_controller.php
>>>
>>> >> class ProvidersController extends AppController {
>>>
>>> var $name = 'Providers';
>>> }
>>> ?>
>>>
>>> *Notice: *If you want to customize this error message, create
>>> app\views\errors\missing_controller.ctp
>>> Now, I don't have Providers, I have Provider (singular only), so where is
>>> it getting the plural from?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret <
>>> yoursurrogate...@gmail.com> wrote:
>>>
 My question in that case would be, why am I getting that error?


 On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret <
 yoursurrogate...@gmail.com> wrote:

> I have a decent understanding of what the tutorial is trying to do.
>  However, trying it to move it into my project is my present issue.
>
> Here is my model:
> http://bin.cakephp.org/view/792515073
> Here is my controller:
> http://bin.cakephp.org/view/514764310
> Here is my view:
> http://bin.cakephp.org/view/1923279272
>
> The issue that I get when I run Search:
>
> Missing Controller
>
> *Error: **ProvidersController* could not be found.
>
> *Error: *Create the class *ProvidersController* below in file:
> app\controllers\providers_controller.php
>
>  class ProvidersController extends AppController {
>
>   var $name = 'Providers';
> }
> ?>
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_controller.ctp
>
> provider_controller.php has a var $name = 'Providers'; as the name...
>
>
> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson wrote:
>
>> my apologies, I saw where you said you wanted to make the tutorial
>> simpler and i assumed that you already knew how to make calls etc.
>>
>> The tutorial is using a search behavior (which probably does the calls
>> - i haven't looked to verify)
>>
>> but to answer your question from above, I would recommend doing the
>>

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Yup.  CakePHP 1.3.  The view is in
\app\views\providers\view_admit_lookup.ctp

The controller file name is providers_controller.php.  I added the variable
that you suggested to the model file (which is called Provider.php) and I
get the same error :-( .

On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Did you change anything? This is 1.3, right?
>
> The filename should be providers_controller.php
> Change the code as per my post below.
> The view should be in /app/views/providers/
> Add $var $name = 'Provider'; to the beginning of the Provider model file.
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 24 Oct 2011, at 18:40, Yves S. Garret wrote:
>
> This is my view:
> http://bin.cakephp.org/view/1913574686
> This is my controller:
> http://bin.cakephp.org/view/1556854836
> This is my model:
> http://bin.cakephp.org/view/416003093
>
> This is the error that I'm getting:
> Missing Controller
>
> *Error: **ProviderController* could not be found.
>
> *Error: *Create the class *ProviderController* below in file:
> app\controllers\provider_controller.php
>
>  class ProviderController extends AppController {
>
>   var $name = 'Provider';
> }
> ?>
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_controller.ctp
>
>
> :-/
>
> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit <
> jeremybu...@classoutfit.com> wrote:
>
>> Your controller names should be plural; try:
>>
>>
>>1. class ProvidersController extends AppController {
>>2. var $name = 'Providers';
>>
>>
>>
>> Jeremy Burns
>> Class Outfit
>>
>> http://www.classoutfit.com
>>
>> On 24 Oct 2011, at 18:24, Yves S. Garret wrote:
>>
>> Ok, this is weird.
>>
>> I found this tutorial on doing searches.
>> http://mrphp.com.au/code/search-forms-cakephp
>>
>> That's good.  Now, this is my Model:
>> http://bin.cakephp.org/view/1495255597
>> View:
>> http://bin.cakephp.org/view/814828491
>>  Controller:
>> http://bin.cakephp.org/view/1212386780
>>
>> Now, when I run the search based on someone, I get something like this:
>>  Missing Controller
>>
>> *Error: **ProvidersController* could not be found.
>>
>> *Error: *Create the class *ProvidersController* below in file:
>> app\controllers\providers_controller.php
>>
>> > class ProvidersController extends AppController {
>>
>>  var $name = 'Providers';
>> }
>> ?>
>>
>> *Notice: *If you want to customize this error message, create
>> app\views\errors\missing_controller.ctp
>> Now, I don't have Providers, I have Provider (singular only), so where is
>> it getting the plural from?
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret <
>> yoursurrogate...@gmail.com> wrote:
>>
>>> My question in that case would be, why am I getting that error?
>>>
>>>
>>> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret <
>>> yoursurrogate...@gmail.com> wrote:
>>>
 I have a decent understanding of what the tutorial is trying to do.
  However, trying it to move it into my project is my present issue.

 Here is my model:
 http://bin.cakephp.org/view/792515073
 Here is my controller:
 http://bin.cakephp.org/view/514764310
 Here is my view:
 http://bin.cakephp.org/view/1923279272

 The issue that I get when I run Search:

 Missing Controller

 *Error: **ProvidersController* could not be found.

 *Error: *Create the class *ProvidersController* below in file:
 app\controllers\providers_controller.php

 >>> class ProvidersController extends AppController {

var $name = 'Providers';
 }
 ?>

 *Notice: *If you want to customize this error message, create
 app\views\errors\missing_controller.ctp

 provider_controller.php has a var $name = 'Providers'; as the name...


 On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson wrote:

> my apologies, I saw where you said you wanted to make the tutorial
> simpler and i assumed that you already knew how to make calls etc.
>
> The tutorial is using a search behavior (which probably does the calls
> - i haven't looked to verify)
>
> but to answer your question from above, I would recommend doing the
> tutorial OUTSIDE of your current project just to familiarize yourself with
> what it is asking you to do.
>
> Once you get that up and running you would have a much better
> understanding of what direction you would rather go in as a developer.
>
> so...yes...follow all steps in the tut.
>
> Now, if you are going away from the tutorial, you can just the data
> that comes back in the $this->data collection from your search box in the
> view and use that model call I used above.  If you dont understand this 
> last
> bit, it is best you try the tutorial out first with a fresh install 
> etc...so
> as not to disrupt your project or in the very l

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Did you change anything? This is 1.3, right?

The filename should be providers_controller.php
Change the code as per my post below.
The view should be in /app/views/providers/
Add $var $name = 'Provider'; to the beginning of the Provider model file.


Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 24 Oct 2011, at 18:40, Yves S. Garret wrote:

> This is my view:
> http://bin.cakephp.org/view/1913574686
> This is my controller:
> http://bin.cakephp.org/view/1556854836
> This is my model:
> http://bin.cakephp.org/view/416003093
> 
> This is the error that I'm getting:
> Missing Controller
> 
> Error: ProviderController could not be found.
> 
> Error: Create the class ProviderController below in file: 
> app\controllers\provider_controller.php
> 
>  class ProviderController extends AppController {
> 
>   var $name = 'Provider';
> }
> ?>
> Notice: If you want to customize this error message, create 
> app\views\errors\missing_controller.ctp
> 
> 
> 
> :-/
> 
> 
> On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit 
>  wrote:
> Your controller names should be plural; try:
> 
> class ProvidersController extends AppController {
> var $name = 'Providers';
> 
> 
> Jeremy Burns
> Class Outfit
> 
> http://www.classoutfit.com
> 
> On 24 Oct 2011, at 18:24, Yves S. Garret wrote:
> 
>> Ok, this is weird.
>> 
>> I found this tutorial on doing searches.
>> http://mrphp.com.au/code/search-forms-cakephp
>> 
>> That's good.  Now, this is my Model:
>> http://bin.cakephp.org/view/1495255597
>> View:
>> http://bin.cakephp.org/view/814828491
>> Controller:
>> http://bin.cakephp.org/view/1212386780
>> 
>> Now, when I run the search based on someone, I get something like this:
>> Missing Controller
>> 
>> Error: ProvidersController could not be found.
>> 
>> Error: Create the class ProvidersController below in file: 
>> app\controllers\providers_controller.php
>> 
>> > class ProvidersController extends AppController {
>> 
>>  var $name = 'Providers';
>> }
>> ?>
>> Notice: If you want to customize this error message, create 
>> app\views\errors\missing_controller.ctp
>> 
>> Now, I don't have Providers, I have Provider (singular only), so where is it 
>> getting the plural from?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret 
>>  wrote:
>> My question in that case would be, why am I getting that error?
>> 
>> 
>> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret  
>> wrote:
>> I have a decent understanding of what the tutorial is trying to do.  
>> However, trying it to move it into my project is my present issue.
>> 
>> Here is my model:
>> http://bin.cakephp.org/view/792515073
>> Here is my controller:
>> http://bin.cakephp.org/view/514764310
>> Here is my view:
>> http://bin.cakephp.org/view/1923279272
>> 
>> The issue that I get when I run Search:
>> 
>> Missing Controller
>> 
>> Error: ProvidersController could not be found.
>> 
>> Error: Create the class ProvidersController below in file: 
>> app\controllers\providers_controller.php
>> 
>> > class ProvidersController extends AppController {
>> 
>>  var $name = 'Providers';
>> }
>> ?>
>> Notice: If you want to customize this error message, create 
>> app\views\errors\missing_controller.ctp
>> 
>> 
>> provider_controller.php has a var $name = 'Providers'; as the name... 
>> 
>> 
>> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson  wrote:
>> my apologies, I saw where you said you wanted to make the tutorial simpler 
>> and i assumed that you already knew how to make calls etc.  
>> 
>> The tutorial is using a search behavior (which probably does the calls - i 
>> haven't looked to verify)
>> 
>> but to answer your question from above, I would recommend doing the tutorial 
>> OUTSIDE of your current project just to familiarize yourself with what it is 
>> asking you to do.  
>> 
>> Once you get that up and running you would have a much better understanding 
>> of what direction you would rather go in as a developer.  
>> 
>> so...yes...follow all steps in the tut.  
>> 
>> Now, if you are going away from the tutorial, you can just the data that 
>> comes back in the $this->data collection from your search box in the view 
>> and use that model call I used above.  If you dont understand this last bit, 
>> it is best you try the tutorial out first with a fresh install etc...so as 
>> not to disrupt your project or in the very least back it up.
>> 
>> 
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
>> others with their CakePHP related questions.
>>  
>>  
>> 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
>> 
>> 
>> 
>> 
>> -- 
>> Our newest site for the community: CakePHP Video Tutorials 
>> http://tv.cakephp.org 
>> Check out the new CakePHP Questions site http://ask.cakephp.org

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
This is my view:
http://bin.cakephp.org/view/1913574686
This is my controller:
http://bin.cakephp.org/view/1556854836
This is my model:
http://bin.cakephp.org/view/416003093

This is the error that I'm getting:
Missing Controller

*Error: **ProviderController* could not be found.

*Error: *Create the class *ProviderController* below in file:
app\controllers\provider_controller.php



*Notice: *If you want to customize this error message, create
app\views\errors\missing_controller.ctp


:-/

On Mon, Oct 24, 2011 at 1:31 PM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Your controller names should be plural; try:
>
>
>1. class ProvidersController extends AppController {
>2. var $name = 'Providers';
>
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 24 Oct 2011, at 18:24, Yves S. Garret wrote:
>
> Ok, this is weird.
>
> I found this tutorial on doing searches.
> http://mrphp.com.au/code/search-forms-cakephp
>
> That's good.  Now, this is my Model:
> http://bin.cakephp.org/view/1495255597
> View:
> http://bin.cakephp.org/view/814828491
> Controller:
> http://bin.cakephp.org/view/1212386780
>
> Now, when I run the search based on someone, I get something like this:
>  Missing Controller
>
> *Error: **ProvidersController* could not be found.
>
> *Error: *Create the class *ProvidersController* below in file:
> app\controllers\providers_controller.php
>
>  class ProvidersController extends AppController {
>
>   var $name = 'Providers';
> }
> ?>
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_controller.ctp
> Now, I don't have Providers, I have Provider (singular only), so where is
> it getting the plural from?
>
>
>
>
>
>
>
> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret <
> yoursurrogate...@gmail.com> wrote:
>
>> My question in that case would be, why am I getting that error?
>>
>>
>> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret <
>> yoursurrogate...@gmail.com> wrote:
>>
>>> I have a decent understanding of what the tutorial is trying to do.
>>>  However, trying it to move it into my project is my present issue.
>>>
>>> Here is my model:
>>> http://bin.cakephp.org/view/792515073
>>> Here is my controller:
>>> http://bin.cakephp.org/view/514764310
>>> Here is my view:
>>> http://bin.cakephp.org/view/1923279272
>>>
>>> The issue that I get when I run Search:
>>>
>>> Missing Controller
>>>
>>> *Error: **ProvidersController* could not be found.
>>>
>>> *Error: *Create the class *ProvidersController* below in file:
>>> app\controllers\providers_controller.php
>>>
>>> >> class ProvidersController extends AppController {
>>>
>>> var $name = 'Providers';
>>> }
>>> ?>
>>>
>>> *Notice: *If you want to customize this error message, create
>>> app\views\errors\missing_controller.ctp
>>>
>>> provider_controller.php has a var $name = 'Providers'; as the name...
>>>
>>>
>>> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson wrote:
>>>
 my apologies, I saw where you said you wanted to make the tutorial
 simpler and i assumed that you already knew how to make calls etc.

 The tutorial is using a search behavior (which probably does the calls -
 i haven't looked to verify)

 but to answer your question from above, I would recommend doing the
 tutorial OUTSIDE of your current project just to familiarize yourself with
 what it is asking you to do.

 Once you get that up and running you would have a much better
 understanding of what direction you would rather go in as a developer.

 so...yes...follow all steps in the tut.

 Now, if you are going away from the tutorial, you can just the data that
 comes back in the $this->data collection from your search box in the view
 and use that model call I used above.  If you dont understand this last 
 bit,
 it is best you try the tutorial out first with a fresh install etc...so as
 not to disrupt your project or in the very least back it up.


 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and
 help others with their CakePHP related questions.


 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

>>>
>>>
>>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.c

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your controller names should be plural; try:

class ProvidersController extends AppController {
var $name = 'Providers';


Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 24 Oct 2011, at 18:24, Yves S. Garret wrote:

> Ok, this is weird.
> 
> I found this tutorial on doing searches.
> http://mrphp.com.au/code/search-forms-cakephp
> 
> That's good.  Now, this is my Model:
> http://bin.cakephp.org/view/1495255597
> View:
> http://bin.cakephp.org/view/814828491
> Controller:
> http://bin.cakephp.org/view/1212386780
> 
> Now, when I run the search based on someone, I get something like this:
> Missing Controller
> 
> Error: ProvidersController could not be found.
> 
> Error: Create the class ProvidersController below in file: 
> app\controllers\providers_controller.php
> 
>  class ProvidersController extends AppController {
> 
>   var $name = 'Providers';
> }
> ?>
> Notice: If you want to customize this error message, create 
> app\views\errors\missing_controller.ctp
> 
> Now, I don't have Providers, I have Provider (singular only), so where is it 
> getting the plural from?
> 
> 
> 
> 
> 
> 
> 
> On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret  
> wrote:
> My question in that case would be, why am I getting that error?
> 
> 
> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret  
> wrote:
> I have a decent understanding of what the tutorial is trying to do.  However, 
> trying it to move it into my project is my present issue.
> 
> Here is my model:
> http://bin.cakephp.org/view/792515073
> Here is my controller:
> http://bin.cakephp.org/view/514764310
> Here is my view:
> http://bin.cakephp.org/view/1923279272
> 
> The issue that I get when I run Search:
> 
> Missing Controller
> 
> Error: ProvidersController could not be found.
> 
> Error: Create the class ProvidersController below in file: 
> app\controllers\providers_controller.php
> 
>  class ProvidersController extends AppController {
> 
>   var $name = 'Providers';
> }
> ?>
> Notice: If you want to customize this error message, create 
> app\views\errors\missing_controller.ctp
> 
> 
> provider_controller.php has a var $name = 'Providers'; as the name... 
> 
> 
> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson  wrote:
> my apologies, I saw where you said you wanted to make the tutorial simpler 
> and i assumed that you already knew how to make calls etc.  
> 
> The tutorial is using a search behavior (which probably does the calls - i 
> haven't looked to verify)
> 
> but to answer your question from above, I would recommend doing the tutorial 
> OUTSIDE of your current project just to familiarize yourself with what it is 
> asking you to do.  
> 
> Once you get that up and running you would have a much better understanding 
> of what direction you would rather go in as a developer.  
> 
> so...yes...follow all steps in the tut.  
> 
> Now, if you are going away from the tutorial, you can just the data that 
> comes back in the $this->data collection from your search box in the view and 
> use that model call I used above.  If you dont understand this last bit, it 
> is best you try the tutorial out first with a fresh install etc...so as not 
> to disrupt your project or in the very least back it up.
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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
> 
> 
> 
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>  
>  
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, this is weird.

I found this tutorial on doing searches.
http://mrphp.com.au/code/search-forms-cakephp

That's good.  Now, this is my Model:
http://bin.cakephp.org/view/1495255597
View:
http://bin.cakephp.org/view/814828491
Controller:
http://bin.cakephp.org/view/1212386780

Now, when I run the search based on someone, I get something like this:
Missing Controller

*Error: **ProvidersController* could not be found.

*Error: *Create the class *ProvidersController* below in file:
app\controllers\providers_controller.php



*Notice: *If you want to customize this error message, create
app\views\errors\missing_controller.ctp
Now, I don't have Providers, I have Provider (singular only), so where is it
getting the plural from?







On Fri, Oct 21, 2011 at 12:30 PM, Yves S. Garret  wrote:

> My question in that case would be, why am I getting that error?
>
>
> On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret <
> yoursurrogate...@gmail.com> wrote:
>
>> I have a decent understanding of what the tutorial is trying to do.
>>  However, trying it to move it into my project is my present issue.
>>
>> Here is my model:
>> http://bin.cakephp.org/view/792515073
>> Here is my controller:
>> http://bin.cakephp.org/view/514764310
>> Here is my view:
>> http://bin.cakephp.org/view/1923279272
>>
>> The issue that I get when I run Search:
>>
>> Missing Controller
>>
>> *Error: **ProvidersController* could not be found.
>>
>> *Error: *Create the class *ProvidersController* below in file:
>> app\controllers\providers_controller.php
>>
>> > class ProvidersController extends AppController {
>>
>>  var $name = 'Providers';
>> }
>> ?>
>>
>> *Notice: *If you want to customize this error message, create
>> app\views\errors\missing_controller.ctp
>>
>> provider_controller.php has a var $name = 'Providers'; as the name...
>>
>>
>> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson wrote:
>>
>>> my apologies, I saw where you said you wanted to make the tutorial
>>> simpler and i assumed that you already knew how to make calls etc.
>>>
>>> The tutorial is using a search behavior (which probably does the calls -
>>> i haven't looked to verify)
>>>
>>> but to answer your question from above, I would recommend doing the
>>> tutorial OUTSIDE of your current project just to familiarize yourself with
>>> what it is asking you to do.
>>>
>>> Once you get that up and running you would have a much better
>>> understanding of what direction you would rather go in as a developer.
>>>
>>> so...yes...follow all steps in the tut.
>>>
>>> Now, if you are going away from the tutorial, you can just the data that
>>> comes back in the $this->data collection from your search box in the view
>>> and use that model call I used above.  If you dont understand this last bit,
>>> it is best you try the tutorial out first with a fresh install etc...so as
>>> not to disrupt your project or in the very least back it up.
>>>
>>>  --
>>> Our newest site for the community: CakePHP Video Tutorials
>>> http://tv.cakephp.org
>>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>>> others with their CakePHP related questions.
>>>
>>>
>>> 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
>>>
>>
>>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-21 Thread Yves S. Garret
My question in that case would be, why am I getting that error?

On Thu, Oct 20, 2011 at 5:12 PM, Yves S. Garret
wrote:

> I have a decent understanding of what the tutorial is trying to do.
>  However, trying it to move it into my project is my present issue.
>
> Here is my model:
> http://bin.cakephp.org/view/792515073
> Here is my controller:
> http://bin.cakephp.org/view/514764310
> Here is my view:
> http://bin.cakephp.org/view/1923279272
>
> The issue that I get when I run Search:
>
> Missing Controller
>
> *Error: **ProvidersController* could not be found.
>
> *Error: *Create the class *ProvidersController* below in file:
> app\controllers\providers_controller.php
>
>  class ProvidersController extends AppController {
>
>   var $name = 'Providers';
> }
> ?>
>
> *Notice: *If you want to customize this error message, create
> app\views\errors\missing_controller.ctp
>
> provider_controller.php has a var $name = 'Providers'; as the name...
>
>
> On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson  wrote:
>
>> my apologies, I saw where you said you wanted to make the tutorial simpler
>> and i assumed that you already knew how to make calls etc.
>>
>> The tutorial is using a search behavior (which probably does the calls - i
>> haven't looked to verify)
>>
>> but to answer your question from above, I would recommend doing the
>> tutorial OUTSIDE of your current project just to familiarize yourself with
>> what it is asking you to do.
>>
>> Once you get that up and running you would have a much better
>> understanding of what direction you would rather go in as a developer.
>>
>> so...yes...follow all steps in the tut.
>>
>> Now, if you are going away from the tutorial, you can just the data that
>> comes back in the $this->data collection from your search box in the view
>> and use that model call I used above.  If you dont understand this last bit,
>> it is best you try the tutorial out first with a fresh install etc...so as
>> not to disrupt your project or in the very least back it up.
>>
>>  --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> 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
>>
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-20 Thread Yves S. Garret
I have a decent understanding of what the tutorial is trying to do.
 However, trying it to move it into my project is my present issue.

Here is my model:
http://bin.cakephp.org/view/792515073
Here is my controller:
http://bin.cakephp.org/view/514764310
Here is my view:
http://bin.cakephp.org/view/1923279272

The issue that I get when I run Search:

Missing Controller

*Error: **ProvidersController* could not be found.

*Error: *Create the class *ProvidersController* below in file:
app\controllers\providers_controller.php



*Notice: *If you want to customize this error message, create
app\views\errors\missing_controller.ctp

provider_controller.php has a var $name = 'Providers'; as the name...


On Tue, Oct 18, 2011 at 3:27 PM, Dee Johnson  wrote:

> my apologies, I saw where you said you wanted to make the tutorial simpler
> and i assumed that you already knew how to make calls etc.
>
> The tutorial is using a search behavior (which probably does the calls - i
> haven't looked to verify)
>
> but to answer your question from above, I would recommend doing the
> tutorial OUTSIDE of your current project just to familiarize yourself with
> what it is asking you to do.
>
> Once you get that up and running you would have a much better understanding
> of what direction you would rather go in as a developer.
>
> so...yes...follow all steps in the tut.
>
> Now, if you are going away from the tutorial, you can just the data that
> comes back in the $this->data collection from your search box in the view
> and use that model call I used above.  If you dont understand this last bit,
> it is best you try the tutorial out first with a fresh install etc...so as
> not to disrupt your project or in the very least back it up.
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-18 Thread Dee Johnson
my apologies, I saw where you said you wanted to make the tutorial simpler 
and i assumed that you already knew how to make calls etc.  

The tutorial is using a search behavior (which probably does the calls - i 
haven't looked to verify)

but to answer your question from above, I would recommend doing the tutorial 
OUTSIDE of your current project just to familiarize yourself with what it is 
asking you to do.  

Once you get that up and running you would have a much better understanding 
of what direction you would rather go in as a developer.  

so...yes...follow all steps in the tut.  

Now, if you are going away from the tutorial, you can just the data that 
comes back in the $this->data collection from your search box in the view 
and use that model call I used above.  If you dont understand this last bit, 
it is best you try the tutorial out first with a fresh install etc...so as 
not to disrupt your project or in the very least back it up.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-18 Thread Yves S. Garret
And yes, the specific column does exist already.

Also, when you wrote this portion:

$this->Model->find('all', array('conditions' => array('Model.lastname LIKE'
=> '%' . $searchterm . '%')));

I didn't see that in the tutorial, where did you get this?

On Tue, Oct 18, 2011 at 2:45 PM, Dee Johnson  wrote:

> If I understand correctly you want to search for a literal 'Smith' and not
> any %Smith% which yeilds results containing Smith as well?  If you have a
> column for last name already you can just alter your find query in the
> controller to only bring back that specific item
>
> $this->Model->find('all', array('conditions' => array('Model.lastname' =>
> $searchterm)));
> as opposed to
> $this->Model->find('all', array('conditions' => array('Model.lastname
> LIKE'  => '%' . $searchterm . '%')));
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-18 Thread Yves S. Garret
Thanks for your reply.

To be more specific, would it make sense to do this portion of the tutorial?

Setup

So to get things started, we need to download seachable behavior from (
http://code.google.com/p/searchable-behaviour-for-cakephp). Then we copy the
archive contents to the /app folder. To complete the installation process
there is one more thing to do: create the search table. So we run the
following sql code:

CREATE TABLE `search_index` (
`id` int(11) NOT NULL auto_increment,
`association_key` int(11) NOT NULL,
`model` varchar(128) collate utf8_unicode_ci NOT NULL,
`data` longtext collate utf8_unicode_ci NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY  (`id`),
KEY `association_key` (`association_key`,`model`),
FULLTEXT KEY `data` (`data`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


On Tue, Oct 18, 2011 at 2:45 PM, Dee Johnson  wrote:

> If I understand correctly you want to search for a literal 'Smith' and not
> any %Smith% which yeilds results containing Smith as well?  If you have a
> column for last name already you can just alter your find query in the
> controller to only bring back that specific item
>
> $this->Model->find('all', array('conditions' => array('Model.lastname' =>
> $searchterm)));
> as opposed to
> $this->Model->find('all', array('conditions' => array('Model.lastname
> LIKE'  => '%' . $searchterm . '%')));
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Implementing a search functionality

2011-10-18 Thread Dee Johnson
If I understand correctly you want to search for a literal 'Smith' and not 
any %Smith% which yeilds results containing Smith as well?  If you have a 
column for last name already you can just alter your find query in the 
controller to only bring back that specific item 

$this->Model->find('all', array('conditions' => array('Model.lastname' => 
$searchterm)));
as opposed to 
$this->Model->find('all', array('conditions' => array('Model.lastname LIKE'  
=> '%' . $searchterm . '%')));

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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