Re: Help please for ultra-beginner

2007-12-12 Thread Sanfly
Hi I had tried something similar to this before, using "hasOne (ugroup)" in the users model, and "belongsTo (users)" in the ugroup model. The code I had tried, and the one you suggested, both came up with a SQL error. Ive ended up solving this using Tuftys code, with the addition of this from A

Re: Help please for ultra-beginner

2007-12-12 Thread avairet
I add another comment: if you are using Eclipse and PDT Eclipse, the autocompletion for model's methods in controller doesn't work again. On 12 déc, 16:07, avairet <[EMAIL PROTECTED]> wrote: > Ok, that works! Very nice! > > But in this case, some of my "find() or save() calls" become more > comp

Re: Help please for ultra-beginner

2007-12-12 Thread avairet
Ok, that works! Very nice! But in this case, some of my "find() or save() calls" become more complex: $this->Model1->Model2->Model3->save(); And the resultsets of my find are now in the DESC order... Avairet On 12 déc, 15:54, avairet <[EMAIL PROTECTED]> wrote: > Hi Mr Tufty, > > I didn't know

Re: Help please for ultra-beginner

2007-12-12 Thread avairet
Hi Mr Tufty, I didn't know that... It's very interesting. I will try it immediately because I've a doubt... that the associated models is known in my controller. I will reply after my test! Avairet On 12 déc, 13:56, MrTufty <[EMAIL PROTECTED]> wrote: > Yes, you can do it that way too. But if

Re: Help please for ultra-beginner

2007-12-12 Thread MrTufty
Yes, you can do it that way too. But if you set up the associations, you don't NEED to change $uses to include Ugroup, as it will automatically be included based on it's association with the User model. On Dec 12, 9:22 am, avairet <[EMAIL PROTECTED]> wrote: > Hello, > > My cake knowledge is limit

Re: Help please for ultra-beginner

2007-12-12 Thread avairet
Hello, My cake knowledge is limited too (2 months), but I think you must specify your 2 models in your controller. Something like that in PHP5 context: And maybe you should specify the association in your 2 models... Something like that: and for the associated model: And finally, you mus

Re: Help please for ultra-beginner

2007-12-12 Thread MrTufty
The error message you're getting tells you what the problem is... on line 34, you're referring to $this->Ugroup->findByUgroupid(). This would be fine, except that you haven't told cake to give you access to Ugroup in this way. I'm assuming you have a model for Ugroup, and that it's associated wit

Re: Help please for ultra-beginner

2007-12-12 Thread Sanfly
No good im afraid, same error, except ugroup_id is now ugroupid Notice: Undefined property: UsersController::$Ugroup in C:\server\www \cake\basic_site\plugins\users\controllers\users_controller.php on line 34 Fatal error: Call

Re: Help please for ultra-beginner

2007-12-11 Thread chad
try findByUgroupId On Dec 11, 10:08 pm, Sanfly <[EMAIL PROTECTED]> wrote: > Hi > > Ive only just started mucking around with CakePHP, and am having a > little trouble getting my head around the controllers and models > thingees. YES - I have tried looking in the manual!! > > Im trying to make a

Help please for ultra-beginner

2007-12-11 Thread Sanfly
Hi Ive only just started mucking around with CakePHP, and am having a little trouble getting my head around the controllers and models thingees. YES - I have tried looking in the manual!! Im trying to make a cake website that will more or less mirror some normal-non-framework php sites I have d