saving in a loop

June 22, 2006

Just found this on google groups

Question: How to save (Model->save()) in a loop without overwriting the first one:

Workaround:

After calling $this->Model->save( ), call $this->Model->create( ).
This will re-initialize the model for writing new data.

Entry Filed under: baking tips, cakephp. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Top Posts

Recent Posts

a

bakers

feeds

general

uncategorized

Archives

Recent Comments

reviews on About
vishal on CakePhp Coding Standards
Ezoteraa on new installation of cake: open…
lanamep on new installation of cake: open…
marthavos on new installation of cake: open…

 

June 2006
M T W T F S S
    Jul »
 1234
567891011
12131415161718
19202122232425
2627282930  

Meta