Re: Lots of queries to pull up user photos and their comments

2009-11-04 Thread centr0
Update: This query is what i typically want run for the comments part of the contain: SELECT Comment.content, Comment.created, Comment.modified, Photo.thumbnail, User.name FROM comments AS Comment

Lots of queries to pull up user photos and their comments

2009-11-03 Thread centr0
my models: user hasmany comment profile hasmany comment user hasone profile user hasone photo comment belongsto user profile belongsto user photo belongsto user what im trying to do is pull up profile information and the profiles comments. here is my index() and its find(): function in

ACL and/or Auth?

2009-10-30 Thread centr0
My application only has 1 level of authentication. Would ACL be overkill for this? Will the Auth component take care of this? Does CakePHP hold sessions for anonymous users? If so, is there a way not to track sessions for anonymous users that havent logged in/ registered? TIA --~--~-~

Re: Parse error in Model.

2009-10-28 Thread centr0
omg. kill me. this is what i get for programming in java for a month.. then going back to php. thank you toby... and thanks miles for the link! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Parse error in Model.

2009-10-28 Thread centr0
For the life of me i cant figure out why im getting a parse error. array( 'rule' => 'email', 'message' => 'Email address is required.' ), 'password' => array( 'rule' => 'alphaNumeric',

Re: $hasOne/'dependent' => 'true' vs. $belongsTo

2009-08-30 Thread centr0
nevermind, figured it out. i was putting it in the wrong model. goals rather than users On Aug 30, 3:17 pm, centr0 wrote: > this is my app's relationships as far as i have set them up. > > users have many goals > goals belongsTo users > users habtm departments >

$hasOne/'dependent' => 'true' vs. $belongsTo

2009-08-30 Thread centr0
this is my app's relationships as far as i have set them up. users have many goals goals belongsTo users users habtm departments departments habtm users departments have many categories categories have many goals goals belongsTo users, departments, and categories when i scaffold this setup ever

HABTM filtering on find()

2009-07-06 Thread centr0
I have a Book and Author model thats a many to many relationship. I was wondering if there was a way in the BooksController that i can filter out books by author name, and in the AuthorsController filter out authors by book title. --~--~-~--~~~---~--~~ You received

Re: generateList() returning SQL error.

2009-07-04 Thread centr0
l 4, 10:03 pm, Hendry wrote: > What cake version are you using now? If it is cake 1.2, generateList > is deprecated, you should use find('list'). > Also, would be more helpful if you post your Book and Author model and > its relationship here. > > ~hendry > > O

generateList() returning SQL error.

2009-07-04 Thread centr0
my db is designed as one author can have many books. books belongsto authors. when i call generateList() i get a 1064 SQL error. here is my add action: public function add() { if(!empty($this->data)) { $this->Book->create(); $this->Book->save($this->data);

find() returning different array structures.

2009-06-14 Thread centr0
i'm still learning the inner workings of cakephp and have been confused for a while now. heres a simple view: when i call: $books = $this->Book->find('all', array( 'fields' => array ('isbn', 'title'),