Hey Guys,
Great help... I just started with CakePHP and I'm tuning in to the
Google Group to pick up some things. I learned a lot through this
thread. Thanks for that.
Best,
Jonathan
On Oct 10, 2:25 pm, Raphi wrote:
> Ahh thank you guys so much!
>
> Adding the "url" to the form-helper did the
Ahh thank you guys so much!
Adding the "url" to the form-helper did the trick. I'm using the Auth-
component so I'll use $this->Auth->user('id') to identify the user.
I also deleted the "belongsTo" statement from my user_profile model
and everything is working in the exact same way so this really
Sometimes, if you use both 'hasOne' and 'belongsTo' it doesn't work. I
experienced it very often. Try just to use one of them.
And the second point is that, if you have typed it here correctly,
your $belongsTo is not correct. $belongsTo = array(''); but try it
without belongsTo. I had those iss
On Fri, Oct 8, 2010 at 1:41 PM, Raphi wrote:
> Ok let me try to explain.
>
> I have two tables involved: users, user_profiles
>
> Of course there is a model-file to any of the tables so: user.php,
> user_profile.php
> The models are linked via a "hasOne"(parent key user_id) relationship.
> (which
Ok let me try to explain.
I have two tables involved: users, user_profiles
Of course there is a model-file to any of the tables so: user.php,
user_profile.php
The models are linked via a "hasOne"(parent key user_id) relationship.
(which is working perfectly).
But now I want to implement a method
On Sun, Oct 3, 2010 at 4:49 PM, Raphi wrote:
> Hi, thank you for you quick response. Unfortunately I neither do use
> AJAX nor have the data saved in the users table. I guess I have to use
> two controllers anyway. :(
Well, perhaps you could state your problem clearer, then. What is the
schema of
Hi that doesn't work. Cake takes the array and outputs it as html
attributes to the form tag:
echo $form->create('UserProfile',array('controller' => 'users',
'action' => 'editUser'));
gives me:
'')
array the controller seems to be predefined by conventions. So a
create('UserProfile') form w
echo $form->create('UserProfile');
to
echo $form->create('UserProfile',array('controller' => 'users',
'action' => 'editUser'));
On Oct 3, 11:01 am, Raphi wrote:
> Hi there,
>
> I'm new to Cake and now I seem to have a little understanding problem.
> The situation is this:
>
> I have a UsersCont
Hi, thank you for you quick response. Unfortunately I neither do use
AJAX nor have the data saved in the users table. I guess I have to use
two controllers anyway. :(
On 3 Okt., 22:36, cricket wrote:
> On Sun, Oct 3, 2010 at 2:01 PM, Raphi wrote:
> > Hi there,
>
> > I'm new to Cake and now I se
On Sun, Oct 3, 2010 at 2:01 PM, Raphi wrote:
> Hi there,
>
> I'm new to Cake and now I seem to have a little understanding problem.
> The situation is this:
>
> I have a UsersController and a User Model. Then there is an
> editProfile() method within my UsersController. Of course I also
> created
Hi there,
I'm new to Cake and now I seem to have a little understanding problem.
The situation is this:
I have a UsersController and a User Model. Then there is an
editProfile() method within my UsersController. Of course I also
created a view (users/edit_profile.ctp). My problem is that I want t
hi
i have two models: User and Address.. the relation is User hasOne
Address.
In my users_controller i declare it like this:
var $name = 'Users';
var $hasOne = 'UserAddress';
var $uses = array('UserAddress');
now after all information are entered in the form i am saving th
My bad - stupid mistake. Thanks for help!
Robert
On 18 Cze, 20:18, floob <[EMAIL PROTECTED]> wrote:
> Hey Robert,
> You've got it a bit backwards. If Item contains all the foreign keys,
> then Item _belongsTo_ ItemType and ItemStatus. Type and Status would
> both "haveOne" Item From the book'
Hey Robert,
You've got it a bit backwards. If Item contains all the foreign keys,
then Item _belongsTo_ ItemType and ItemStatus. Type and Status would
both "haveOne" Item From the book's section on Associations :
belongsTo: "foreignKey: the name of the foreign key found in the
_current_ model
Hi,
I tried to search through the group archive but did not find any
solution. My problem is pretty simple and probably solution is also
simple for all who dealt with cake relations.
I have 3 database tables:
items with columns: id, type, status
item_types with columns: id, name
item_statuses wi
My problem is that every time i update my profile, it does an insert
instead of an update sql command. Is my associations incorrect ?
Thanks.
class Member extends AppModel
{
var $name = 'Member';
var $hasOne = array('Profile' =>
array('className'
Here are my tables:
DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(255) collate utf8_bin NOT NULL,
`iso2` varchar(2) collate utf8_bin NOT NULL,
`iso3` varchar(3) collate utf8_bin NOT NULL,
PRIMARY KEY (`id`)
)
17 matches
Mail list logo