In this snippet $max_bid is a ReddotAuction_Maxbid object which extends Db_ActiveRecord, and I'm checking to see if the new bid was made by the current winning bidder - if it is row just needs to be updated with their new maximum bid.
$amount is the new bid amount, and $user is a Shop_Customer object.
...
// Is the new bid from the current high bidder?
elseif ($user->id == $max_bid->user_id)
{
if ($amount > $max_bid->amount)
{
$max_bid->amount = $amount;
$max_bid->save(); // FIXME doesn't save
return ReddotAuction_Bid::STATE_RAISED;
}
else
{
return ReddotAuction_Bid::STATE_NOT_ENOUGH;
}
}
...
The snippet works correctly and returns the expected state, however the row isn't saved to the database, am I doing something wrong?
Thanks!

Help













