Questions tagged with savefield

0 answers

-1 votes

Asked by spnkychnk, on 29/1/10 in Models

saveField not working correctly ???

Hi,

I am new to cakephp. I like it already. I am trying to use saveField. I have keyed in the savefield like this

$this-Post-id = $id;

$this-Post-saveField('title', 'A New Title for a New Day', true);

Validation does not work.. and it keeps creating...

2 answers

0 votes

Asked by spnkychnk, on 2/2/10 in Models

Please help with Savefield

I am new to cakephp. I like it already. I am trying to use saveField. I have keyed in the savefield like this

$this-Post-id = $id;

$this-Post-saveField('title', 'A New Title for a New Day', true);

Validation does not work.. and it keeps creating new...

2 answers

0 votes

Asked by GregS, on 1/4/10 in Models

How to update a field with a calculated value

I'm working on an inventory system, and need to be able to decrease the "remaining" field in the table. I can read the old value, do the subtraction, and write the new value back, but there are race conditions to be considered, so I want to...

1 answer

0 votes

Asked by mee, on 8/4/10 in Models

Comment puis-je faire un update d'un champ i18n ?

Bonjour,

j'aimerai pouvoir faire un update d'un champ i18n, est ce possible ? Si oui comment ?

En gros je suis dans un behavior, et je souhaite modifier la valeur d'un champ traduisible.

Si je fais:


$model->updateAll(
...

2 answers

0 votes

Asked by evtlucas, on 12/9/11 in Models

saveField error 1064

I am studying cakephp and I tried to use the method saveField with no success. When I tried to do that, I got the error "SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the...

1 answer

0 votes

Asked by fabian1982, on 24/1/12 in Models

saveField not working on foreign key

Hello,

I have massive problems to update a single field using saveField.

$this-loadModel('Change');

$this-Change-id = $id;

$this-Change-saveField('change_state_id',2);

Change has many states. If I update another non foreign key field of 'Change', it's...

<< previous next >>