Try:
$game_final['Game'] = array(
'id' => $this->Session->read('Game.game_id'),
'scored' => $scored,
'conceded' => $conceded,
'correct_answers' => $correct_answers,
'wrong_answers' => $wrong_answers,
'time_end' => date('Y-m-d H:i:s'),
'outcome' => $game_outcome);
$this->Game->save($game_final);
Em 01/07/10 12:51, Andrei Mita escreveu:
I've tried without create, no result.
On Thu, Jul 1, 2010 at 6:40 PM, Edinei L. Cipriani
<[email protected] <mailto:[email protected]>> wrote:
If you have id, you do not need to use create ()
2010/7/1 Andrei Mita <[email protected]
<mailto:[email protected]>>
Hello,
I have tried many different ways to update a record in one
table with no luck. In one simple function I have 2
save(update) queries. The first one is always skipped.
This is the one:
$game_final = array(
'id' => $this->Session->read('Game.game_id'),
'scored' => $scored,
'conceded' => $conceded,
'correct_answers' => $correct_answers,
'wrong_answers' => $wrong_answers,
'time_end' => date('Y-m-d H:i:s'),
'outcome' => $game_outcome);
$this->Game->create();
$this->Game->save($game_final);
Any help much appreciated.
Andrei
Check out the new CakePHP Questions site http://cakeqs.org and
help others with their CakePHP related questions.
You received this message because you are subscribed to the
Google Groups "CakePHP" group.
To post to this group, send email to [email protected]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:cake-php%[email protected]> For more
options, visit this group at
http://groups.google.com/group/cake-php?hl=en
--
Edinei L. Cipriani
Blog: http://phpedinei.wordpress.com
Twitter: http://www.twitter.com/phpedinei
Desenvolvedor Colégio Trilingue Inovação
Site: http://www.colegioinovacao.com.br
Fone 49 84149086
Check out the new CakePHP Questions site http://cakeqs.org and
help others with their CakePHP related questions.
You received this message because you are subscribed to the Google
Groups "CakePHP" group.
To post to this group, send email to [email protected]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:cake-php%[email protected]> For more options,
visit this group at http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help
others with their CakePHP related questions.
You received this message because you are subscribed to the Google
Groups "CakePHP" group.
To post to this group, send email to [email protected]
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
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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