Re: Pulling just name data

2007-02-27 Thread Jon Bennett

 For the life of me I can't find anywhere how to pull data without all
 the associations. For example, I've set up a DB with the table tags
 and it contains an ID and NAME fields only. The HABTM associations get
 pulled. I only want a list of the names of all tags.

 $this-Tag-findAll();

$tag_list = $this-Tag-generateList ();

http://manual.cakephp.org/chapter/models - section 2, retrieving your data

hth

jon

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pulling just name data

2007-02-27 Thread nate

$this-Tag-recursive = 0;
$this-Tag-findAll();

-or-

$this-Tag-findAll(null, null, null, null, null, 0);

On Feb 27, 1:00 pm, Dave [EMAIL PROTECTED] wrote:
 For the life of me I can't find anywhere how to pull data without all
 the associations. For example, I've set up a DB with the table tags
 and it contains an ID and NAME fields only. The HABTM associations get
 pulled. I only want a list of the names of all tags.

 $this-Tag-findAll();

 pulls all the associated records as well. I just want a list of the
 tag names plopped into an array.

 $this-Tag-read();

 maybe? I'm lost on this one.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pulling just name data

2007-02-27 Thread Jon Bennett

 $this-Tag-recursive = 0;
 $this-Tag-findAll();

or

$this-Tag-recursive = 0;
$this-Tag-findAll(null, 'Tag.name');

j


-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pulling just name data

2007-02-27 Thread Radish

Try: http://manual.cakephp.org/chapter/models
search the Retrieving Your Data section.
it is something to do with $recursive.

On Feb 27, 8:00 pm, Dave [EMAIL PROTECTED] wrote:
 For the life of me I can't find anywhere how to pull data without all
 the associations. For example, I've set up a DB with the table tags
 and it contains an ID and NAME fields only. The HABTM associations get
 pulled. I only want a list of the names of all tags.

 $this-Tag-findAll();

 pulls all the associated records as well. I just want a list of the
 tag names plopped into an array.

 $this-Tag-read();

 maybe? I'm lost on this one.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Pulling just name data

2007-02-27 Thread Mariano Iglesias

Or also:

$this-Tag-findAll(null, 'Tag.name', null, null, null, 0);

If you just want the 'name' field returned, and no associated records as
nate shown you.

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Martes, 27 de Febrero de 2007 04:13 p.m.
Para: Cake PHP
Asunto: Re: Pulling just name data

$this-Tag-findAll(null, null, null, null, null, 0);


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pulling just name data

2007-02-27 Thread Dave

Worked. You guys rock.

On Feb 27, 12:25 pm, Mariano Iglesias [EMAIL PROTECTED]
wrote:
 Or also:

 $this-Tag-findAll(null, 'Tag.name', null, null, null, 0);

 If you just want the 'name' field returned, and no associated records as
 nate shown you.

 -MI

 ---

 Remember, smart coders answer ten questions for every question they ask.
 So be smart, be cool, and share your knowledge.

 BAKE ON!

 blog:http://www.MarianoIglesias.com.ar

 -Mensaje original-
 De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
 de nate
 Enviado el: Martes, 27 de Febrero de 2007 04:13 p.m.
 Para: Cake PHP
 Asunto: Re: Pulling just name data

 $this-Tag-findAll(null, null, null, null, null, 0);


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---