I'm trying to get this loop to save a new record to the database in cakephp on each iteration but for some reason its only saving it on the last one (so in this case it saves a record called "test9" but no others.. this type of save has worked for me so far in cakephp and I am completely stumped by this, I would appreciate any advice
The debug output just gives this for each record (including the save that works), so I can't determine anything from it:
26 SELECT COUNT() AS count
FROM proxylinks
AS Proxylink
WHERE Proxylink
.id
= 13 1 1 0
27 SELECT COUNT() AS count
FROM proxylinks
AS Proxylink
WHERE Proxylink
.id
= 13 1 1 0
28 UPDATE proxylinks
SET link
= 'test9' WHERE proxylinks
.id
= 13 1 0
$count = 10;
$v = 1;
do {
######### save link to database
$this->Prox->Proxylink->set(array('link' => 'test' . $v));
$this->Prox->Proxylink->save();
$v++;
} while ($v < $count);